Hi,
The following piece of code is from a reference code provide online.
I would like to know the first line in the reset vector table below.
Address Description ======= =========== 0x0000 0000 Initial Stack Pointer (SP) value 0x0000 0004 Reset exception 0x0000 0008 NMI 0x0000 000C Hard fault 0x0000 0010 Memory management fault 0x0000 0014 Bus fault 0x0000 0018 Usage fault
Does the line "Initial Stack Pointer (SP) value" mean that there is a jump address at location 0x0000 0000 which properly configures the stack pointer?
No; it's an address that is loaded directly into the SP by hardware, before branching to the reset exception address.
In other words, it's not really a "vector", in spite of being part of the vector table.
Correct - the naming is somewhat legacy from previous Arm architectures.
On power on, the sp will automatically be set to the address encoded at 0x0, and the first instruction fetch will be from the address encoded at 0x4.
See any of the many examples provided with Arm Development Studio or Keil MDK (and associated CMSIS Packs), which have code similar to the below.
ExecFuncPtr vector_table[] __attribute__((section("vectors"), used)) = { (ExecFuncPtr)&Image$$ARM_LIB_STACKHEAP$$ZI$$Limit, (ExecFuncPtr)__main, /* Initial PC, set to entry point */ NMIException, HardFaultException, ...
Hi Ronan, WestFW,
Can you provide any document reference that explains this. On A53, I see that on reset the processor jumps to 0x0 (or another high address defined by static configuration). The stack configuration happens as a part of this start-up sequence. Maybe it is applicable to other cores and not A53. So, a reference would help.
SBR,
This is the startup model for Cortex-M processors. It is not applicable to Cortex-A53.
See the below document to understand Cortex-A processors:https://developer.arm.com/documentation/102412
thanks a lot ...
Hi SBR_123 if you think that Ronan has answered your question. Please may you mark the answer as accepted. You can do this by selecting Actions > Accept Answer. Many thanks.
done. thanks.