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.

CC2541: Linking Error : Segment defenition

Part Number: CC2541


Hello,

While running application, I get the below error.

Can anyone please help me to analyze the logs? How can I trace the memory usage statistics of each module?

What is the right way to fix this error?

Best,

Varun

  • Hi Varun,

    Apparently you are running into issues while linking the application due to a lack of Flash.

    Based on the log provided, the linker does not has enough space to store the segment XDATA_I where it should.

    I would recommend to do the following:

    - identify the changes made between the previous successful link and this one. I guess these lead to increasing the amount of code/data stored in flash and/or change the linker command file.

    - look into the map file produced in the previous successful build to see the actual remaining flash size. This will help to understand if the issue is that only the segment is full or if the whole flash is full.

    - find ways to reduce the amount of flash required, or edit the linker command file to better use the available flash.

    Best regards,

  • Hi Clement,

    Many thanks for your reply. 

    Based on your suggestion I already looked into map files. Currently XDATA is consuming 7936 bytes . Do you see any solution here? when I am increasing the D_XDATA_END, the error is resolved. Could you please tell what are the things which needs to be taken care of say if I am increasing the size of XDATA?

    I am attaching the map file here .

    navtechelect-my.sharepoint.com/.../EYIn6QUgIsdFgos1njhctdABaB_ROvGBfvP8GFiy0Fgu_w

    along with linker configuration file navtechelect-my.sharepoint.com/.../Ed9HZVJqzQhFsqRFV3Hn0yMB1JqVvGN3Mj2jGawNemn6Ow

    Best,

    Varun

  • Hi Varun,

    I do not manage to access the files you have provided.

    Generally speaking, if no section are overlapping in Flash, you should be good.

    Best regards,