Pandabear1125
Member
Hello,
As an educational diversion, I'm trying to learn about linker scripts and how processors "know" what instruction to run first when they boot/get flashed. I read online that normal c/c++ programs include a reset vector that points to the first function or something. I also read that the cortex M-7 looks at the start of the CODE section, address 0x0.
I made a simple sketch and disassembled it, but it seems like the code starts at 0x60000000. This lines up with what the linker script says FLASH starts. I also noticed that inside the .text.code, .startup is first. I assume that this means any function slated to be in .startup would run first. The only three functions that are marked .startup are memory_copy, memory_clear, and ResetHandler.
Am I correct in stating that ResetHandler is the first function called on boot? It would make sense that code execution would start at the top of .text.code, but I couldn't find anything online saying that exactly.
Thanks,
Panda
As an educational diversion, I'm trying to learn about linker scripts and how processors "know" what instruction to run first when they boot/get flashed. I read online that normal c/c++ programs include a reset vector that points to the first function or something. I also read that the cortex M-7 looks at the start of the CODE section, address 0x0.
I made a simple sketch and disassembled it, but it seems like the code starts at 0x60000000. This lines up with what the linker script says FLASH starts. I also noticed that inside the .text.code, .startup is first. I assume that this means any function slated to be in .startup would run first. The only three functions that are marked .startup are memory_copy, memory_clear, and ResetHandler.
Am I correct in stating that ResetHandler is the first function called on boot? It would make sense that code execution would start at the top of .text.code, but I couldn't find anything online saying that exactly.
Thanks,
Panda