This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone,
The startup file provided by TI setups the initial stack pointer at 0x20004000. I am wondering why it is not placed at the start of the RAM region which address is 0x20000000.. As the stack pointer goes upward I guess this makes us wasting 0x4000 bytes of RAM (16K), and therefore only use 0xC000 bytes. It is enough for me but it looks weird..
/* Interrupt vector table. Note that the proper constructs must be placed on this to */ /* ensure that it ends up at physical address 0x0000.0000 or at the start of */ /* the program if located at a start address other than 0. */ void (* const interruptVectors[])(void) __attribute__ ((section (".intvecs"))) = { (void (*)(void))((uint32_t)0x20004000), /* The initial stack pointer */ resetISR, /* The reset handler */ ... };
Thank you for helping me to understand this point (:
Best regards,
As the stack pointer goes upward ...
Where have you heard that ?
Check again, and the question will be answered.
Besides of specific TI documents, I can recommend http://infocenter.arm.com/help/index.jsp as source for information about the Cortex M cores in general.
I just assumed "upward" to mean "increasing numbers" or "increasing addresses". If attach a unit (like meter or yard), and assume the number to be a radius, you can get gravity into the picture ...
If not, my upward can be your downward. (This has nothing to do with the fact that I am Chinese.)
Since I am sitting in Europe, our vectors of "strongest gravity pull" might actually point into opposite directions, 3D-wise ...
I am looking in CCS and see the use of __STACK_END, which is placed at 0x20010000. I will dig into this and see if I can find a history.
#pragma DATA_SECTION(interruptVectors, ".intvecs")
void (* const interruptVectors[])(void) =
{
(void (*)(void))((uint32_t)&__STACK_END),
/* The initial stack pointer */
resetISR, /* The reset handler */
nmiISR, /* The NMI handler */
000003b5 SystemInit
4000480c WDTCTL_SYM
20010000 __STACK_END
00000200 __STACK_SIZE
000009ec __TI_CINIT_Base
**Attention** This is a public forum