No OS, direct hardware access & ARM Cortex-M

Firmware Engineering &
Bare-Metal Programming

A technical journal dedicated to writing custom linkers, ARM Cortex-M startup files, direct memory-mapped I/O registers, and real-time embedded systems.

Quick Filter:
● gpio_mmio.c
// Direct Memory-Mapped I/O register manipulation for ARM Cortex-M
#define RCC_AHB1ENR (*(volatile uint32_t *)(0x40023830))
#define GPIOD_MODER (*(volatile uint32_t *)(0x40020C00))
#define GPIOD_ODR   (*( volatile uint32_t *)(0x40020C14))

void toggle_led_baremetal(void) {
    RCC_AHB1ENR |= (1 << 3);  // Enable GPIOD clock
    GPIOD_MODER |= (1 << 24); // Set pin 12 as general output
    GPIOD_ODR   ^= (1 << 12); // Toggle LED pin state
}

Firmware Dispatches

Showing 3 posts
#cortex-m 7 min read

Writing a Custom ARM Cortex-M Vector Table & Startup Script

Setting up the initial Stack Pointer, Reset Handler, and interrupt service routines from scratch without vendor SDKs.

OCT 2026 Read Dispatch
#linker 9 min read

Demystifying Linker Scripts: Memory Maps & Section Layouts

Configuring FLASH and RAM regions, aligning `.text`, `.data`, and `.bss` sections, and handling zero-initialization correctly.

OCT 2026 Read Dispatch
#registers 6 min read

Volatile Qualifiers & Memory Barriers in Embedded C

Preventing aggressive compiler optimizations on hardware peripheral registers using `volatile` and `DMB/DSB` instructions.

SEP 2026 Read Dispatch

Subscribe to Baremetal Notes

Receive weekly firmware architecture notes, microcontroller register guides, and low-level C dispatches in your inbox.