AnsweredAssumed Answered

Access linker symbols in S12Z tool chain (eclipse)

Question asked by Alessandro Mommo on Nov 25, 2014
Latest reply on Dec 1, 2014 by Alessandro Mommo

I'm compiling using CW10.6 eclipse plugin. I tried to retreive linker defined symbols referencing to memory segments. I used macros taken from MCU_Build_Tools_Utilities, Revised: June 10, 2014, page 100. They are:

#define __SEG_START_REF(a) __SEG_START_ ## a

#define __SEG_END_REF(a) __SEG_END_ ## a

#define __SEG_SIZE_REF(a) __SEG_SIZE_ ## a

#define __SEG_START_DEF(a) extern char __SEG_START_REF(a) []

#define __SEG_END_DEF(a) extern char __SEG_END_REF( a) []

#define __SEG_SIZE_DEF(a) extern char __SEG_SIZE_REF( a) []



I have defined the symbol SHADOW_ROM_S in prm file covering a memory area from 0xFFEE00 to 0xFFEFFF. In my code I define a variable ptTest and I tried the following assigment

char* const ptTest = __SEG_START_REF(SHADOW_ROM_S);


By the way, before previous assigment i used macro  __SEG_START_DEF(SHADOW_ROM_S) to declare a variable __SEG_START_SHADOW_ROM_S.


I expected to have ptTest egual to 0xFFEE00  but i got a pointer to 0 instead.


What should I do to get the correct value?