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.

SampleBLEPeripheral link error @IAR Workbench

Other Parts Discussed in Thread: BLE-STACK, CC2540

Hi all,

 

I have a CC2541 (Sensor Tag) that is flashed with Firmware v1.5 . I also downloaded BLE-Stack and Tools v1.4 and IAR Workbench for 8051 version 8.30.1 as development IDE. I followed the steps of the CC25410/41 Software Developers Guide v1.3.2  to build the example project SimpleBLEPeripheral. The setup and everything else went flawless including the compilation of the published source files that I have not changed. When the linking started I got the following error:

 

I tried to build the project for different pre-defined targets from the drop down menu but the error was the same at the end.

 Anyone has a hint or idea?

 Thanks.

  • Let me answer my own question. I read a similar post in this community. The problem is the IDATA size that was selected 14 (0xe) bytes longer than available memory in my case. I selected the IDATA size 0xB0 instead of 0xC0 under "Stack/Heap" options and that solved the problem.

  • That solution might let you compile but a TI person corrected that solution last week on a similar thread:

    What to look for in the old versions of the .xcl files is where virtual registers are placed:
    -Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F
     How it must look in 8.30 and later versions:
    -Z(DATA)VREG =08-7F

    This command will fix all the linker files if you run it on the ble stack root directory:

    find . |grep "xcl$" |xargs sed -i "s/+_NR_OF_VIRTUAL_REGISTERS//"

    I have no idea why they would have this bug in 1.3 and release 1.4 without fixing it.  They specifically said in the 1.4 release notes that all projects were tested.  I guess testing doesn't mean they tried to compile!

  • It solved my problem with building the Peripheral example code.

    To recap,

    I changed the occurrence of

    -Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F

    to

    -Z(DATA)VREG=08-7F

    in file:

    C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\ti_51ew_cc2540b.xcl

    At time of Writing that bug is still in the sample code to download from

    www.ti.com/blestack

    so something for TI engineers to revise.

    Thanks,

    --

    Gunnar   Mobimation AB, Sweden