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.

CC2530-CC2591EM-RD: SLEEP_CODE ERROR while compiling on IAR 8.10 CC2530 Application

Part Number: CC2530-CC2591EM-RD

Hello everyone,

While rebuilding an application with IAR 8.20.1 and TIMAC 1.5.0, I'm getting the following error

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:a8-af SFR_AN
BIT:b8-c7 SFR_AN
BIT:f8-ff SFR_AN

I am using the subsequent extended command line file (with checked Override default option)

ti_51ew_cc2530b_ota.xcl

In General Options - Target I specified Device CC2530F256, Code Model Banked and Data Model Large

Part of the .xcl file

// Sleep PCON instruction must be 4-byte aligned.
//
-D_SLEEP_CODE_SPACE_START=(_CODE_END-7)
-D_SLEEP_CODE_SPACE_END=(_CODE_END)
-Z(CODE)SLEEP_CODE=_SLEEP_CODE_SPACE_START-_SLEEP_CODE_SPACE_END

Can anyone please help? Thank you!