Skip to content
0:00 / 0:00

#stm32#linkerscript#startupcode

How a Microcontroller starts

Artful Bytes

69K subscribers • 2 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

173K views1 year ago3 recommendations

Systems programmingHardwareEmbedded systemsCMemory management

How a microcontroller boots up, exploring STM32 assembly startup code and writing a custom C runtime and linker script from scratch.

Practical Notes on Embedded (starts with a guide to learning embedded by building): artfulbytes.com/ ------ We explore the startup of a microcontroller using STM32 as an example. First, we look at the manufacturer's assembly code, then we write it from scratch in C. Overview Create a basic project in STM32CubeIDE Review STM32 startup code (assembly) Write startup code from scratch (C) Discard libc, startfiles and default linker script Startup file Linker script Debug C runtime init (CRT0) Link with libc (Newlib) __libc_init_array (constructors) system_init and _start Final thoughts Code: github.com/artfulbytes/how_a_microcontroller_starts_video 🌍 Related links embeddedartistry.com/blog/2019/04/08/a-general-overview-of-w… interrupt.memfault.com/blog/zero-to-main-1 github.com/ataradov/mcu-starter-projects

Why it's here

3 people recommend this

What people say. Recommended as a detailed step-by-step guide to understanding the bare-metal boot sequence, linker scripts, and memory initialization on ARM microcontrollers.

u/Resident-Bar8422in r/embedded • Recommends

On “Bare metal boot sequence”

Please check this: link to this video You can understand what an IVT is and other info for an ARM CPU

u/Priton-CEin r/embedded • Recommends

On “Is embedded programming right for me?”

…You can understand E V E R Y T H I N G (rather easily imo). Everything in FreeRTOS is contained within just a few C files and ST products in general are just very easy to explore and understand. I feel like there is no magic. Everything I see I can root down to interrupts, timers, execution contexts, memory regions, registers, etc. Watch this: [video for Microcontrollers and this: [video for RTOS. If this is of interest to you then you are probably right here or at least its worth checking it out more.…

u/rokko1337in r/embedded • Recommends

On “Bare metal boot sequence”

link to this video this is a great video about software part of this topic, he besically explains what happens after power and clock stabilization and provides very detailed step by step guide of creating pre main() code (linker script, memory sectors init, etc).