https://github.com/msaw328/arm_minimal_runtime
Building ARM firmware without HAL, stdlibs and using a custom linker script
https://github.com/msaw328/arm_minimal_runtime
arm armv7m assembly-language bare-metal bare-metal-programming c cortex-m4 cortex-m4f educational-project nucleo-64 nucleo-board stm32 stm32l476rg
Last synced: about 2 months ago
JSON representation
Building ARM firmware without HAL, stdlibs and using a custom linker script
- Host: GitHub
- URL: https://github.com/msaw328/arm_minimal_runtime
- Owner: msaw328
- Created: 2025-03-31T22:48:39.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-11T22:34:26.000Z (about 1 year ago)
- Last Synced: 2025-04-11T23:32:31.000Z (about 1 year ago)
- Topics: arm, armv7m, assembly-language, bare-metal, bare-metal-programming, c, cortex-m4, cortex-m4f, educational-project, nucleo-64, nucleo-board, stm32, stm32l476rg
- Language: C
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
Building runtime for STM32L476RG (Cortex-M4F) without using HAL and generated headers.
Running on the Nucleo-64 L476RG board.
At the moment the program only blinks the USER LED built on the nucleo board twice per second using Timer7 and interrupts.
I hope to get DMA working soon.
This project is similar to my other project "avr_minimal_runtime" which was based on Atmega8, AVR architecture.
(As of writing this, available at https://github.com/msaw328/avr_minimal_runtime)
Hopefully i will get around to documenting both projects, but for now the best writeup
is in the comments and notes directory.
Heavily based on excellent blog posts (first 3 at the moment) available here:
https://vivonomicon.com/category/stm32_baremetal_examples/page/2/
with some modifications since:
- I used a different chip
- I found some code to be easy to optimize (for instance the vector table, with a use of a macro)
- I did not want to use vendor headers
Recommended manuals which helped me along the way, in no specific order:
(from ST website)
- Nucleo board PDF (Nucleo 64, ST32L476RG) UM1724/MB1136 (first is doc ID, second board ID i think?)
- STM32L476xx Data sheet
- STM32L4xxxx Reference manual RM0351
- STM32 Cortex-M4 Programming manual PM0214
- Electronic schematics of the board (MB1136 maybe is the doc id of schematic?)
- STM32 Application note AN2606 (for information on boot modes)
(from ARM website)
- ARM and THUMB instruction set specs
- Cortex-M4 Technical reference manual
- ARM7M Architecture Reference manual
The solution to any problem usually required knowledge from multiple of those sources.
I recommend looking in all of them selectively by topic when needed.
In this project, references are made to mentioned documents in notes, as well as in some places in code.