HomeCore 0.1.3 (07b5544)
Bare-metal personal computer firmware for Cortex-M
Loading...
Searching...
No Matches
HomeCore API

HomeCore is single-threaded C11 bare-metal firmware. It provides a serial shell, a VFS with RAM files and mounted FAT and littlefs volumes, user sessions, a 1 kHz uptime clock, and the G2BASIC interpreter. This reference covers the public headers under include/homecore. The source is on GitHub.

Guides

Guide Contents
A first session A guided ten-minute tour in QEMU
BASIC guide Programming HomeCore in BASIC, with examples
Architecture Layers, startup, memory, and runtime contracts
Development Setup, builds, configuration, tests, and debugging
C coding standard Language, style, memory, and interrupt rules
Drivers Device descriptions, bindings, initialization, interrupts, and each driver
Device bindings Generated reference of every compatible, its properties, and the boards using it
Files and storage The VFS, mounted filesystems (FAT, littlefs), and block devices
Shell and system services Commands, sessions, files, and uptime
Extending Adding shell commands and VFS device nodes
Porting Adding boards, SoCs, and architecture support
Versioning SemVer rules, the public interface, and the changelog

Boards

Board Core Status
LM3S6965EVB Cortex-M3, 64 KB RAM QEMU tested in CI
STM32F4DISCOVERY Cortex-M4F, 128 KB RAM Builds in CI; hardware validation pending
STM32VLDISCOVERY Cortex-M3, 8 KB RAM QEMU tested in CI; hardware validation pending

Supported boards compares features, memory, and build presets.

Layers

The API is grouped by layer. Each header defines one module group.

Layer Modules Header location
Hardware abstraction Architecture, SoC, Board support homecore/arch, homecore/soc, homecore/board
Drivers Console, GPIO, LEDs, Block devices homecore/drivers
Kernel services Kernel, Users, Sessions homecore/kernel, homecore/user, homecore/session
Subsystems Virtual file system, Filesystems (FAT filesystem, littlefs filesystem), Shell homecore/vfs, homecore/fs, homecore/shell

The group tree is on the Topics page. Each group page shows its place in the hierarchy. Each header page shows include graphs in both directions. Structures that reference other documented types show a collaboration graph.

Bundled libraries

CMSIS is used only inside the architecture and SoC code; the public API does not expose its types. Its reference is Arm's documentation for the pinned release.

Library Reference Used by
CMSIS 6.3.0 Core (external/cmsis) CMSIS-Core (Cortex-M) NVIC, SysTick, and SCB access in src/arch, device headers in src/soc
STM32F4 device headers (external/stm32f4) Vendored ST CMSIS device headers; no separate reference The STM32F407 SoC port
FatFs R0.16 (external/fatfs) FatFs documentation; HomeCore's use is in FAT filesystem FAT volumes, compiled only for boards that mount one
littlefs v2.11.3 (external/littlefs) README, design; HomeCore's use is in littlefs filesystem littlefs volumes, compiled only for boards that mount one

G2Basic is built into this site from the pinned submodule commit, so it matches this firmware. Its groups are also listed on the Topics page.

Library Reference Used by
G2Basic (external/g2basic) G2Basic API, starting with the Embedding API The basic shell command, which registers millis(), led(), and ledget()

Startup order

main() calls arch_init(), soc_init(), board_init(), dt_init() (generated driver initialization), k_init(), dt_mount_all() (the board's filesystem mounts), and shell_init() in that order, then prints the banner and enters shell_run(). A module may depend only on modules initialized before it. For example, soc_init() registers VFS devices but must not print, because the console is not open until k_init().

Scope

The firmware has no scheduler, privilege separation, authentication, or persistent storage: every mounted volume is a ramdisk formatted at boot. The architecture thread primitives are scaffolding; the SVC and PendSV handlers they depend on currently panic.