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.

Make error msg: Fatal Error[e72]: Segment SLEEP_CODE must be defined in a segment definition option (-Z, -b or -P)

Other Parts Discussed in Thread: CC2541, CC2530, CC2540

I am the new to use the BLE of CC2541. And meet the problem to Make/Rebuild the project of 'CC2541 SensorTag' that supported by TI. the error message as the Subject. And attached the screen print of the error and config setting and the IAR version (V8.30).

I also found more user met this problem when beginning to use the IAR and TI CC2530/CC2540/CC2541. So pls give me some advice or explain the reason for the error.

Very appreciate for your help.

Yimin

  • Ok. now solved by using the TI BLE folder .xcl file when do the linking., 

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

  • YIMIN LI,

    I'm having the same problem, but even if I change the link file as you suggests the problem remains.

    I'm using the Sensortag code sample given with the Btool and Texas Instruments CC2540/41 Bluetooth® Low Energy Sample Applications Guide v1.3.1.

    I didn't change/edit anything in the code, and the error below insists. I just followed the 4.1 IAR Overview of the Texas Instruments CC2540/41 Bluetooth® Low Energy Software Developer’s Guide v1.3.2

    Do you have any other Advice? Have you changed something else?

    Any TI expert help also would be nice.

    Thank you.

    Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0xe more bytes needed. The problem occurred while processing the segment placement command "-Z(IDATA)ISTACK+_IDATA_STACK_SIZE#08-_IDATA_END", where at the moment of placement the available memory ranges were "IDATA:4e-ff"

  • hi, Dear Yuri:


    answer:

    1. your error is e16 and it is different from the 'e72'.

    2. there are few solution for the error 'e16', but need you to test

    2.1. use the IAR version 8.20, the error should be solved

    or

    2.2. for IAR V8.30,  pls check the highlight setting in 'General Options' as below photos, and set the 'Stack size to 0xb0. 

    or

    2.3 or solve as here:

    for IAR V8.30, you should do few modification as below:

    C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\ti_51ew_cc2540b.xcl,open it and find "-Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F",please change it to "-Z(DATA)VREG=08-7F"

    or

    2.4,  TI answer:  "TI BLE 1.4 libraries are not compatible with IAR Embedded Workbench v8.30.2. ". so you'd better use the IAR V8.20 bcs the the BLE 1.4 library was done by this version.

    BRs,

    Yimin

  • Hi Yimin,

    Maybe I wasn't clear, let me explain: I had the exact same problem than you. Same error, same screen. AFTER I made the change you suggested, the new error (shown in my post) appear.

    Before I had your answer, I was considering the possibility to downgrade my IAR to 8.20, but I found a useful hint in the website below:

    http://stackoverflow.com/questions/22090954/how-to-modify-the-ti-sensortag-firmware-to-advertise-indefinitely

    The user Mathijs suggest in the topic 5 to change the number of virtual registers from 16 to 8. I did it and it worked.

    Looking to your answer we can see in the topic 2.3 you suggest the modification of virtual registers, what might work as well.

    Thank you for the suggestions, I really appreciate your help!

  • Thanks... I changed the stack size and it is working now.

    But I am having trouble with the SimpleBLEPeripheral code. I am not able to pair with the device. I am getting the following error:

    "Couldn't pair with the device because of an incorrect PIN or passkey"


    This is the part of code I am concerned with 

    {
    uint32 passkey = 0; // passkey "000000"
    uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
    uint8 mitm = TRUE;
    uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
    uint8 bonding = TRUE;
    GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
    GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
    GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
    GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
    GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
    }

    I am using the 1.4.0 stack with IAR Workbench v9.10.3

     

  • Getting the exact same Fatal Error message. Any TI employees on here that can chime in? I'm doing the SimpleBLECentral.c which was modified (by TI) to accept 128-bit UUID. I'm using the CC2540EM, is it wise to use the lnk51ew_CC2540F256_banked.xcl under the Linker category which is what it is by default or the one not marked as _banked? Assuming this is a valid approach to resolving the issue?