Quick Start Guide

March 25, 2026 ยท View on GitHub

Supported Boards

F9 Microkernel supports the following boards:

Toolchain Requirements

Building F9 Microkernel requires an arm-none-eabi toolchain with Cortex-M4F support:

Building F9

Configuration

Configuration is the first build step. Run make config to select options. The build system generates a .config file and a configuration header include/autoconf.h for C programs.

Compilation

Run make to build. Output files are placed in the build directory.

Flashing and Debugging

STM32F4 Boards

For flashing and debugging on STM32F4 boards, stlink is required. With st-flash in the PATH, make flash programs the STM32F4DISCOVERY board with the built F9 binary image.

Source-level debugging with gdb is possible via OpenOCD or stlink, but may be limited on resource-constrained targets.

In-Kernel Debugger (KDB)

KDB (in-kernel debugger) is enabled by default and provides essential kernel inspection. Press ? to display the menu:

KeyFunction
aDump address spaces
eDump ktimer events
KPrint kernel tables
mDump memory pools
MDump MPU status
nShow timer (now)
pShow sampling (requires SYMMAP)
sShow softirqs
tDump threads
vShow tickless scheduling status

KDB communicates via USART. The port can be selected during make config.

Serial Port Configuration

STM32F4DISCOVERY

PortTX PinRX Pin
USART4PA0PA1
USART2PA2PA3
USART1PA9PA10

STM32F429I-DISC1

PortTX PinRX Pin
USART4PC11PC10
USART2PD5PD6
USART1PA9PA10

NUCLEO-F429ZI

PortTX PinRX Pin
USART3PD8PD9
USART2PD5PD6
USART1PB6PB7

Note: On the NUCLEO-F429ZI, USART3 is connected to the on-board VCOM (Virtual COM Port) provided by the ST-LINK.

QEMU Emulation

For B-L475E-IOT01A under QEMU, semihosting carries normal console output and USART1 is reserved for KDB input. Run with:

qemu-system-arm -M b-l475e-iot01a -nographic \
    -semihosting -serial mon:stdio \
    -kernel build/b-l475e-iot01a/f9.elf

Note: -serial mon:stdio is still required for interactive KDB shell. The mon: prefix enables QEMU monitor access via Ctrl+A then c. Exit with Ctrl+A then x.

Serial Terminal Setup

For physical boards, connect a USB-to-serial adapter and use a terminal emulator at 115200 baud, 8N1. For example, with screen:

screen /dev/ttyUSB0 115200 8n1

Press Ctrl-a and `k to exit screen.