Hi..
I have this problem that I cannot retrieve the Start and End address of segment
Let's say I have this in my PRM file:
SEGMENTS
RAM_F8 = READ_WRITE 0xF81100 TO 0xF81FFF ALIGN 2[1:1];
RAM_F9 = READ_WRITE 0xF91000 TO 0xF91FFF ALIGN 2[1:1];
...
RAM_FD = READ_WRITE 0xFD1000 TO 0xFD1FFF ALIGN 2[1:1];
END
PLACEMENT
XGATE_STRING_RAM, XGATE_CONST_RAM, XGATE_CODE_RAM, XGATE_DATA
INTO RAM_FD;
END
How will I be able to retrieve the start and end address of XGATE_DATA?
I have tried this:
extern T_s8 __SEG_START_XGATE_DATA[];
extern T_s8 __SEG_END_XGATE_DATA[];
#define XGateRamStart __SEG_START_XGATE_DATA
#define XGateRamEnd __SEG_END_XGATE_DATA
But this does not seem to work. The values I retrieve for __SEG_START_XGATE_DATA and __SEG_END_XGATE_DATA are 0.
Please if you have an idea how to do it. Thanks
I tried to use "extern T_s8 __SEG_START_XGATE_DATA;" instead of extern T_s8 __SEG_START_XGATE_DATA[];
and find this in my MAP file:
- VARIABLES:
S12XAccessViolation 36CC C 12 7 .common
XGAccessViolation 36D8 C 12 7 .common
S12XStackBoundsViolation 36E4 6 6 3 .common
XGStackBoundsViolation 36EA 7 7 4 .common
__SEG_START_XGATE_DATA 29F2 1 1 1 .bss
__SEG_END_XGATE_DATA 29F3 1 1 1 .bss
- LABELS:
__SEG_START_SSTACK 2002 0 0 9
__SEG_START_XGATE_CODE_FLASH 0 0 0 4
__SEG_END_XGATE_VECTORS E089DC 0 0 4
My previous project build results to this:
- VARIABLES:
S12XAccessViolation 36CC C 12 7 .common
XGAccessViolation 36D8 C 12 7 .common
S12XStackBoundsViolation 36E4 6 6 3 .common
XGStackBoundsViolation 36EA 7 7 4 .common
- LABELS:
__SEG_START_SSTACK 2002 0 0 9
__SEG_START_XGATE_DATA 0 0 0 4
__SEG_END_XGATE_DATA 0 0 0 4
__SEG_START_XGATE_CODE_FLASH 0 0 0 4
__SEG_END_XGATE_VECTORS E089DC 0 0 4
__SEG_START_XGATE_DATA and __SEG_END_XGATE_DATA will return 0 if there is no data allocated in the section XGATE_DATA.