Hello,
I'm developping an application on a TMS320F28032 (with CCStudio V3.3). I want to implement a bootloader in Flash sector A. (the application will reside in sector B/C/D etc..)
Therefore, I want to locate the c_int00 code at a defined location in FlashA.
I've modified the linker file to add a memory region and a section for this purpose.
MEMORY
{
PAGE 0: /* Program Memory */
FLASHA_C_INT: origin = 0x3F7000, length = 0x000080 /* on-chip FLASH sector A - Stores c_int00 */:
{
PAGE 0: /* Program Memory */
FLASHA_C_INT: origin = 0x3F7000, length = 0x000080 /* on-chip FLASH sector A - Stores c_int00 */:
....
.cint_00 {
rts2800_ml.lib<boot.obj>
} > FLASHA_C_INT
rts2800_ml.lib<boot.obj>
} > FLASHA_C_INT
When I link the application, c_int00 is located at 3F7000 as expected. But the stack is no longer properly initialized.
After downloading the application with the debugger, I look at c_int00.
I find :
3F7000 _c_int00, _stack:
3F7000 28AD7000 || MOV @SP,#0x7000
3F7002 FF69 SPM 0
3F7003 561F SETC OBJMODE
3F7000 28AD7000 || MOV @SP,#0x7000
3F7002 FF69 SPM 0
3F7003 561F SETC OBJMODE
So the stack pointer is initialized at the same address as _c_int00 !!!!
Why ?
Where can I find the source code for _c_int00 ?
If I allow the linker to locate _c_int00, everything goes fine (my stack pointer is initialized at 50h as expected).
What did I do wrong ?
Thanks for your help.
Regards.