Sample Source: Embeded OS for PIC32MX270F256B logo

Sample Source: Embeded OS for PIC32MX270F256B

Free

Bare-metal embedded OS for PIC32MX270F256B based on KOZOS

FreeFree tier
Type
Open Source
LinksX

About Sample Source: Embeded OS for PIC32MX270F256B

KOZOS-PIC is an open-source embedded operating system for the PIC32MX270F256B microcontroller, ported from the Japanese educational OS 'KOZOS'. Developed from scratch using bare-metal programming, it includes a bootloader (KZLOAD) that loads firmware via XMODEM transfer and a small multitasking kernel with memory management, thread management, message boxes, and serial/timer drivers. The project is intended for learning and hobbyist use and comes with a demo that allows changing LED panel characters from a PC via serial communication.

Key Features

Full scratch programming with bare-metal approach
Bootloader (KZLOAD) loads firmware via XMODEM transfer
Memory management, thread management, multi-tasking, message boxes
Serial driver and timer driver
Demo: change LED panel characters from PC via serial
Open source under MIT license

Pros & Cons

Pros
  • Open source with MIT license
  • Designed for learning and hobbyist use
  • Includes a working bootloader for easy firmware loading
  • Bare-metal implementation helps understand low-level concepts
  • Supports serial communication for debugging/demo
Cons
  • Targets only PIC32MX270F256B (limited portability)
  • Requires specific mips-elf-gcc toolchain (not readily available)
  • Limited documentation and community support
  • Developer notes potential bugs or incomplete features (beginner project)
  • No support for advanced peripherals beyond serial/timer

Best For

Learning embedded operating system conceptsHobbyist development on PIC32MX270F256BBare-metal programming practiceEducational projects for operating system design

FAQ

What hardware is needed?
The OS is designed for the PIC32MX270F256B microcontroller or compatible board, plus a serial conversion cable for communication.
What toolchain is required?
You need mips-elf-gcc (cross compiler) and a fixed version of mips-elf-objdump (or use p32-objdump from pinguino-compilers).
How do I build and run the OS?
Run 'make' in the bootload directory, then 'make' in the os directory. In your serial terminal, use 'kzload load' then send the hex file via XMODEM, then 'kzload run'.
What is the license?
KOZOS-PIC is released under the MIT license.
Where can I get help or report issues?
You can contact the developer on Twitter: @envzhu, or open an issue on the GitHub repository.