Porting uCOSII to the raspberry pi A+/B+/2B
FreePorting µC/OS-II and user application to Raspberry Pi A+/B+/2B
FreeFree tier
About Porting uCOSII to the raspberry pi A+/B+/2B
This project provides a port of the µC/OS-II real-time operating system (version 2.9) to the Raspberry Pi models A+, B+, and 2B. It includes a complete board support package (BSP) with interrupt, UART, and timer drivers, a bootloader in assembly, standard C library, CPU porting code, and a sample user application that demonstrates bare-metal GPIO control and UART messaging. The repository contains the full source tree, toolchain configuration scripts, and build instructions to generate kernel.img (for A+/B+) or kernel7.img (for 2B) that can be copied to an SD card.
Key Features
Full µC/OS-II v2.9 source code included
Board support package for Raspberry Pi A+/B+/2B (interrupt, UART, timer)
Bootloader in assembly language
CPU porting code for ARM architecture
Standard C library implementation
Sample user application with bare-metal GPIO and UART output
Toolchain configuration for x86 and x86_64 hosts
Build scripts to generate kernel.img and kernel7.img
Pros & Cons
Pros
- Open source with complete source code available on GitHub
- Well-documented directory structure and build process
- Includes a working user application example demonstrating GPIO and UART
- Supports multiple Raspberry Pi models (A+, B+, 2B)
- Provides toolchain binaries for both 32-bit and 64-bit hosts
Cons
- Specifically targets older Raspberry Pi models (A+/B+/2B) – not compatible with Pi 3 or 4 without modification
- Based on µC/OS-II v2.9, which is an older version of the RTOS
- Last release was in July 2015, indicating limited ongoing maintenance
- Requires manual setup of toolchain and SD card copying; no automated flashing tool
Best For
Learning real-time operating system porting on ARM-based single-board computersBare-metal embedded development on Raspberry PiEducational projects for embedded systems coursesAdding RTOS capabilities to Raspberry Pi projects without Linux
FAQ
What hardware is supported?
The port supports Raspberry Pi models A+, B+, and 2B. For A+/B+ you copy kernel.img, for 2B you copy kernel7.img to the SD card.
How do I build the project?
Configure the toolchain path in the makefile (for x86_64 or x86 host) and run 'make'. The build produces kernel.img or kernel7.img depending on the target.
What does the user application do?
The sample application in the usrApp folder uses bare-metal GPIO to blink the ACT LED and sends a message via UART when the board is powered on.
Which version of µC/OS-II is used?
The project includes µC/OS-II source code version 2.9, along with its documentation.