Keil Logo

L166: ?C_INITSEC and ?C_CLRMEMSEC Located at Wrong Address


Information in this knowledgebase article applies to:

  • C166 Version 4 and higher

SYMPTOMS

After adding some functions, my application does not work anymore. The project is compiled and linked without any errors and warnings. This is an excerpt from my Project.M66 file:

START     STOP      LENGTH    TYPE  RTYP  ALIGN  TGR  GRP  COMB  CLASS   SECTION NAME
=====================================================================================
   :         :         :        :    :      :     :    :    :     :           :
020000H   020001H   000002H   XDATA REL   WORD   ---  ---  GLOB  ---     ?C_INITSEC
020002H   00000BH   00000AH   CONST ABS   WORD   ---  ---  PRIV  ---     ?C_CLRMEMSEC

I see that the sections ?C_INITSEC and ?C_CLRMEMSEC are located outside my flash area. I specified the CLASSES NCODE, FCODE, ICODE and all others correctly. Why does ?C_INITSEC and ?C_CLRMEMSEC not get located within my specified flash areas?

CAUSE

The sections ?C_INITSEC and ?C_CLRMEMSEC do not belong to a CLASS. Since version 4, these sections are located with the L166 directive CINITTAB. Obviously, this directive is missing in your linker command file or in the µVision dialog Options for Target - L166 Misc - Misc Controls.

When Options for Target - L166 Locate - Use Memory Layout from Target Dialog is selected, µVision creates the CINITTAB directive automatically with the memory ranges you have chosen in Options for Target - Target.

RESOLUTION

  • Choose Options for Target from the Project menu and click on the L166 Misc tab.
  • Enter the CINITTAB ([Range]) directive with the correct range into the Misc Controls box.

- or -

  • Add CINITTAB ([Range]) to your linker command file.

MORE INFORMATION

  • Refer to CINITTAB in the L166 User's Guide.

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


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.