A single plain C file is sufficient to express an embedded program.
As the Cortex-M architecture is designed with C-Code in mind, no assembly level bringup code is required. The projects in this repository show how to program C code on top of a bare metal CPU without an operating system or support libraries like libc.
The purpose of this course is to lay out the programming methods for talking to hardware in a minimal configuration. Our target is a better understanding of interaction with low level hardware and toolchains for embedded systems.
- Lesson 1: Blink RGB LED - alternate between red and blue
- Lesson 2: Blink red LED using the low power interrupt
- Lesson 3: Simple SWO printing of "hello world" and an incrementing counter
- Lesson 4: Advanced SWO printing using printf
The example below (see source code) will blink the RGB led alternating between red and blue.
# simple example
cd k64f/lesson1-blinky
make clean flash
# debug example
cd k64f/lesson4-debug-printf
make clean swo
-
ARM v7-M Architecture Reference Manual:
- p434 : Interrupt Vector Table Layout (Reset Vector, Stack Pointer Initialization)
-
p172-p173 : memory map
-
p663 : security fuse settings
- J-Link software & documentation pack
- [Launchpad GCC] (https://launchpad.net/gcc-arm-embedded)