Part Number: TMS320C6748
Tool/software: TI C/C++ Compiler
I am working on code to check stack limit at runtime. In the process, I'm using linker generated symbols, __TI_STACK_END and __TI_STACK_SIZE. Here is the code snippet:
extern uint32 __TI_STACK_END;
extern uint32 __TI_STACK_SIZE;
uint32 *temp1, *temp2, *temp3;
temp1 = &(__TI_STACK_END);
temp2 = &__TI_STACK_SIZE;
temp3 = temp1 - temp2;
*temp1 = 0x12345678;
when I build, I get the following warning:
"../src/main.c", line 128: warning #17003-D: relocation from function "InitializeBAA" to symbol "__TI_STACK_END" overflowed; the 13-bit relocated address 0xf468 is too large to encode in the 15-bit unsigned field (type = 'R_C6000_SBR_U15_W' (13), file = "./src/main.obj", offset = 0x000003d8, section = ".text")
when I run, values for temp1, temp2, and temp3 don't make sense.
What am I missing?
Thank you.