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.

programing BLE sample project

Hi all

I recently received BLE stack from TI. But when i  attempted to compile the sample projects in IAR Embedded Workbench I got linker error which said the following.

Error[e16]: Segment SLEEP_CODE (size: 0x9 align: 0) is too long for segment definition. At least 0x1 more bytes needed. The problem occurred while
processing the segment placement command "-Z(CODE)SLEEP_CODE=_SLEEP_CODE_SPACE_START-_SLEEP_CODE_SPACE_END", where at
the moment of placement the available memory ranges were "CODE:7ff8-7fff"
Reserved ranges relevant to this placement:
CODE:7ff8-7fff SLEEP_CODE
BIT:0-7 BREG
BIT:80-97 SFR_AN
BIT:a0-af SFR_AN
BIT:b8-c7 SFR_AN
Error while running Linker

When I opened the project it asked me whether i would like to convert the project for the use with this version.
Is it the issue with IAR vesion? 
Kindly help to find the solution.
IAR version info
IAR embedded workbench for 8051 IDE : 8.20.1
IAR embedded workbench common components: 6.4.6.2419
BR 
Gautam Jotkar
  • Hi Gautam,

    This is a problem relating to how 8.20 compiles the code. It is being looked into.

    For now, please use 8.10.4 for the highest compatibility, as that's what the stack is tested on. 8.11 works fine for me, however.

    http://www.iar.com/en/Products/Wireless-solutions/Tools-for-TI-wireless/

    Best regards,
    Aslak 

  • Hi, 

    Please see this forum post: http://e2e.ti.com/support/low_power_rf/f/538/t/235981.aspx#828065.

    Edit 2013-01-18: Note that IAR 8.10.4 is recommended for use as the libraries in the current BLE release is built with this version).

    Br,
    ABO

    --
    PS. Thank you for clicking  Verify Answer  below if this answered your question!

  • Thanks   & ABO 

    I modified <hal_sleep.c> as suggested in the post [http://e2e.ti.com/support/low_power_rf/f/538/t/235981.aspx#828065]

    and now i can compile the project successfully.

    Hope that will not create other issues :P

    Br

    Gautam

  • It seems I may be having a similar problem.  I had no problem compiling the BLE 1.4.0 SimpleBLEPeriferal with the IAR Kickstart (time limited edition) that I downloaded from IAR in December of 2013.  Just bought an IAR license and installed the latest 8.30.1.  Linker error:

    Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0x8 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:48-ff"
       Reserved ranges relevant to this placement:
       IDATA:8-1f           VREG
       IDATA:21-40          VREG
       IDATA:41-42          XSP
       IDATA:43-43          DATA_I
       IDATA:44-45          DATA_Z
       IDATA:46-47          IDATA_Z
       IDATA:48-ff          ISTACK
       BIT:0-7              BREG
       BIT:80-97            SFR_AN
       BIT:a0-af            SFR_AN
       BIT:b8-c7            SFR_AN
       BIT:e8-ef            SFR_AN
       BIT:f8-ff            SFR_AN

    So if I understand correctly, I should install an old version of IAR ew8051.  Is Version 8.10.4 the best version to use?