This repository contains a highly portable simple Operating System (sOS) to run tasks on a MCU.
- Task creation and deletion
- Round robin scheduling
- lightweight timers
- tasks
- timers
- AVR
This repo keeps build tooling inside the build/ directory:
build/win32contains the Visual Studio solution/project for the Win32 example app.build/avrcontains the CMake project and helper scripts for the AVR build.
Tools required:
- Visual Studio 2022 with the Desktop development with C++ workload.
Open the solution:
build/win32/sOS.sln
Build:
- Select
DebugorRelease, then Build.
Output:
build/win32/bin/sOS.exe
Notes:
- The Win32 build is only for the example app and host-side testing.
Tools required:
- CMake 3.20+
- Ninja (recommended for fast builds)
- AVR GCC toolchain (Microchip/Atmel)
- Default toolchain path used by CMake:
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin - Fallback:
C:\Program Files\Microchip\xc8\v2.36\avr\bin
- Default toolchain path used by CMake:
Build (from a terminal in build/avr):
build.batClean (removes all AVR build artifacts):
clean.batOutput:
build/avr/bin/sOS_atmega1284p.hexbuild/avr/bin/sOS_atmega1284p.lst
Configure MCU and clock:
- Edit
build/avr/CMakeLists.txt:SOS_MCU(default:atmega1284p)SOS_F_CPU(default:16000000UL)
Notes:
- AVR build products and intermediate files live under
build/avr. - The CMake build tree is under
build/avr/obj.