Lesson 13: Startup Code

  Рет қаралды 12,603

Gene Schroeder Tech

Gene Schroeder Tech

Күн бұрын

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
@TheDambo1
@TheDambo1 3 жыл бұрын
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
@geneschroedertech7501
@geneschroedertech7501 3 жыл бұрын
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
@salmantechnologies282 Жыл бұрын
these assembly instructions are cpu architecture specific i mean the assembly instruction in the startup code or ... ?
@geneschroedertech7501
@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
@salmantechnologies282 Жыл бұрын
thank you very much this series have a lot to learn great :)@@geneschroedertech7501
@salmantechnologies282
@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
Lesson 14.  Super Loop and Software Module Patterns
20:56
Gene Schroeder Tech
Рет қаралды 3,8 М.
Bare metal embedded lecture-1: Build process
27:58
Fastbit Embedded Brain Academy
Рет қаралды 97 М.
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 57 МЛН
Каха и лужа  #непосредственнокаха
00:15
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 207 МЛН
STM32 Startup code, Bare metal - Part 3
22:42
EmbeddedGeek
Рет қаралды 13 М.
Bare Metal Programming Series 0
25:06
Low Byte Productions
Рет қаралды 54 М.
Bare metal embedded lecture-5:  Linking and analyzing memory map file
25:15
Fastbit Embedded Brain Academy
Рет қаралды 43 М.
Lecture 9: Interrupts
20:43
Embedded Systems and Deep Learning
Рет қаралды 269 М.
Bare metal embedded lecture-3: Writing MCU startup file from scratch
25:24
Fastbit Embedded Brain Academy
Рет қаралды 50 М.
Microcontroller Interrupts | Embedded System Project Series #17
54:40