Frederik,
One more question/doubt, I wonder if this has something to do with my issues with setting the Radio:
Should I use "XDATA Stack reentrant" or "PDATA Stack Reentrant"?
On my project I'm currently setting the Calling convention on General Options/Target of the IAR workbench as "PDATA Stack reentrant" and the compile is succesful.
If I try to set the calling convention as "XDATA Stack reentrant" then the Linker reports several errors:
Error[e16]: Segment XSTACK (size: 0xeff align: 0) is too long for segment definition. At least 0x15d more bytes needed. The problem occurred while processing the segment
placement command "-Z(XDATA)XSTACK+_XDATA_STACK_SIZE=_XDATA0_START-_XDATA0_END", where at the moment of placement the available memory ranges were
"XDATA:f000-fda1"
Reserved ranges relevant to this placement:
XDATA:f000-fda1 XSTACK
BIT:0-7 BREG
BIT:80-87 SFR_AN
BIT:a8-af SFR_AN
BIT:b8-c7 SFR_AN
BIT:e8-ef SFR_AN
BIT:f8-ff SFR_AN
Error[e16]: Segment XDATA_Z (size: 0x54 align: 0) is too long for segment definition. At least 0x54 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 "-none-"
Reserved ranges relevant to this placement:
XDATA:f000-fda1 XSTACK
BIT:0-7 BREG
BIT:80-87 SFR_AN
BIT:a8-af SFR_AN
BIT:b8-c7 SFR_AN
BIT:e8-ef SFR_AN
BIT:f8-ff SFR_AN
Error[e16]: Segment XDATA_I (size: 0x8 align: 0) is too long for segment definition. At least 0x8 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 "-none-"
Reserved ranges relevant to this placement:
XDATA:f000-fda1 XSTACK
BIT:0-7 BREG
BIT:80-87 SFR_AN
BIT:a8-af SFR_AN
BIT:b8-c7 SFR_AN
BIT:e8-ef SFR_AN
BIT:f8-ff SFR_AN
Error[e24]: Segment INTVEC (seg part no 18, symbol "p0_ISR::??INTVEC 107" in module "IO port setting", address [0-85]) overlaps segment XDATA_Z (seg part no 20, symbol
"pktSentFlag" in module "RFCONFIG", address [0-53])
Error[e24]: Segment INTVEC (seg part no 18, symbol "p0_ISR::??INTVEC 107" in module "IO port setting", address [0-85]) overlaps segment XDATA_I (seg part no 16, symbol
"__Constant_24ed20" in module "main", address [0-7])
Error[e24]: Segment XDATA_Z (seg part no 20, symbol "pktSentFlag" in module "RFCONFIG", address [0-53]) overlaps segment XDATA_I (seg part no 16, symbol
"__Constant_24ed20" in module "main", address [0-7])
Error while running Linker
Total number of errors: 6