Keil Logo

C166: section not found after updating to 7.57 or newer


Information in this knowledgebase article applies to:

  • C166 V7.57 or newer

SYMPTOM

In our build script we compile a module in a sub directory and the input file to the compiler also does contain the path:

C166 t/t.c ...

In the linker configuration the code of this module gets located via a SECTION directive:

SECTIONS(?PR?T_T%FCODE (440100H))

This worked well up to the toolchain version 7.56. But after updating to 7.57, the following error is generated during linking:

*** ERROR L110: CANNOT FIND SECTION OR REGBANK
    SECTION: ?PR?T_T
    CLASS:   FCODE

Why does the new toolchain not work any more?

CAUSE

From version 7.56 to 7.57 there was a change in the path handling of the compiler. Previously, only Windows-style path separators '\' were detected. As in the build script, Unix-style separators '/' are used, the whole file parameter including the path was used as section name for the code. Just none C characters were replaced with an underscore.
Now, also the Unix-style path separators are detected, which results in the correct module name without path generated by the compiler. So, the section name in the linker configuration will not find the module's code anymore.

RESOLUTION

In the SECTION directive, change the selector to just contain the module name, without path:

SECTIONS(?PR?T%FCODE (440100H))

and linking will work again.

MORE INFORMATION

Last Reviewed: Friday, August 16, 2019


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.