This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2634: How To Add .cinit Output Section In SYSCONFIG

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello,

For reasons unknown, many of the SDK examples use RAM initialization model. This means that when debugging a FreeRTOS core, the code cannot be run more than once because the initializer for 

uxCurrentNumberOfTasks is missing. Anyway, the solution is to switch on auto-initialization with ROM model:

Naturally this creates the .cinit section. However, there is no output section defined in linker.cmd generated by SYSCONFIG so I get a warning:

In a manually maintained linker script, I would expect to see something like the following:

.cinit              : > OCRAM 

<Question>

How do I add an appropriate .cinit section to the Memory Configurator in SYSCONFIG please?

  • Hi Kier,

    To add the section in memory configurator, please follow the steps below:

    1. Open example.syscfg of your application

    2. Go to the memory configurator section and in sections, add a new section, for example "cint_section", placed in OCRAM. Then scroll down in the new section and add an output section named ".cint" and check alignment with padding.

    3. Refer this screenshot incase you need help

    Now save and close the example.syscfg. Rebuild your application and check the linker.cmd file.

    Regards,
    Shaunak

  • Hi Shaunak,

    That's great, thank you.

    In the end I just added .cinit to the 'Initialization and Exception Handling' section which seemed appropriate. Seems to work just as well.