In this video, I go through the start up code for the STM32 project. I start with the code that run when power is first applied, and end when most hardware has been initialized. Back to the playlist: • Bare Metal Embedded Pr...
Пікірлер: 6
@TheDambo13 жыл бұрын
23:17 -> you need to config VTOR in case of applications with additional bootloader/different application start address, but I don't know why comment (line 181) is about relocation in internal SRAM - I've seen always vector table in FLASH
@geneschroedertech75013 жыл бұрын
Yes, I think the bootloader scenario is the more likely scenario for relocating the vector table. I noticed there is code that defines VECT_TAB_BASE_ADDRESS and it mentions both SRAM and FLASH as options. I think the comment on line 181 is misleading - perhaps the author had more experience using RAM. I guess RAM would be needed if the application wanted to modify interrupt vectors on the fly. Thanks for the comment.
@salmantechnologies282 Жыл бұрын
these assembly instructions are cpu architecture specific i mean the assembly instruction in the startup code or ... ?
@geneschroedertech7501 Жыл бұрын
Yes, these CPU instructions are specific to the instruction set architecture of the CPU contained within the MCU. And of course, this is an ARM CPU. In another lesson we looked at the ARM document that describes each assembly language instruction. The ARM instruction set architecture is a little tricky because there are different sets of instructions, and some CPUs support some and not others. See for example the "Thumb" instructions. It is like the Intel x86 instruction set architecture, which has grown enormously since it was first introduced in the 1980s. I am old enough that I used the first version of the x68 instruction set :)
@salmantechnologies282 Жыл бұрын
thank you very much this series have a lot to learn great :)@@geneschroedertech7501
@salmantechnologies282 Жыл бұрын
But i am wondering why the startup code is in assembly language as in this series we already learned that during compilation the code is converted into machine instruction and the linker combines all the object code and assign memory address to it right and the linker script tells where to map all these code inside the MCU flash so all done here where to map the code So my question is that why we need startup code as we already told in linker script that where to put these compiled machine code and why we need that assembly instructions during this series i completely dived into the compilation but i am confused with the compilation i thought everythin already done in the linker and assembler or assembly instruction @@geneschroedertech7501