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.

cc2540 linker error

Other Parts Discussed in Thread: CC2540

hi,

    i am working on cc2540 .i am getting following  linker error at linking stage ,please help me

Building configuration: io_in_cc254x - Debug
Updating build tree...
Linking
Error[e16]: Segment XDATA_Z (size: 0xabe align: 0) is too long for segment definition. At least 0x8be more bytes needed. The problem occurred while processing the segment placement command  
"-Z(XDATA)XDATA_Z,XDATA_I=_XDATA0_START-_XDATA0_END", where at the moment of placement the available memory ranges were "XDATA:100-2ff"
   Reserved ranges relevant to this placement:
   XDATA:1-ff           XSTACK
   XDATA:100-2ff        XDATA_Z
   BIT:0-7              BREG
   BIT:80-87            SFR_AN
   BIT:90-97            SFR_AN
   BIT:a8-af            SFR_AN
   BIT:b8-c7            SFR_AN
   BIT:d8-df            SFR_AN
   BIT:f8-ff            SFR_AN
Error while running Linker
 
Total number of errors: 1
Total number of warnings: 0

  • I think this you can resolve by change the project options. Right click on the project name shown on the left side panel and select 'Option...'. This will open the dialog box to configure various project option. Select 'General Options' from the category and Click on the 'Target' tab. Here you can fine one option 'Number of virtual registers' at the bottom left corner of the dialog box. You need to change it to '8'. Now recompile the project. This should resolve the error.

    Hope this helps!