Tim,

Common across bulk of ARM processors, the vector table starting at address 0x0 contains the 32-bit value of the stack pointer, address 0x4 contains the reset vector (i.e. where to start execution in supervisor state) and then the exception and IRQ vectors.

As an example, nuttx/arch/arm/src/armv7-m/arm_vectors.c initializes _vectors[]  which sets up "IDLE_STACK" as the reset stack pointer, and "start" as the reset entry point, followed by "exception_common" for vectors 2-15 (NMI, Hard/MM/Bus/Usage faults, SVC, Debug) while the remainder are "exception_direct" for IRQs.

Hope this helps!

On 2/11/25 18:05, Tim Hardisty wrote:
Hello all.

I'm trying to understand the "header" bytes of a NuttX .bin file (ELF?), so I can try and locate and use the ARM Cortex A (SAMA5D2) reset and stack pointer vectors in an MCUboot image.

It seems that there are 32 bytes (after the MCUboot header) of a repeating pattern (0xe59ff018) but I am not sure what follows, other than spotting the "start" address (that matches that reported when I download/debug code via JTAG) about 24 bytes later.

Can anyone help me understand how to work this out? It is probably related to the start assembly code (which is not my forte) and perhaps in the map file?

Context - trying to finish off a boot_image.c function that is copying a NuttX/MCUboot imgtool.py signed binary over to SDRAM to execute it.

Thanks!

TimJTi/TimH

--
Peter Barada
peter.bar...@gmail.com

Reply via email to