A tiny RTOS for ARM Cortex-M3/M4 based Microcontrollers.
Explore the docs »
View Demo · Report Bug · Request Feature
Table of Contents
About The Project
WeeOs is a tiny RTOS for ARM Cortex-M3/M4 processors. It currently supports two scheduling algoriths and four hardware devices.It includes a pre-emptive scheduler that supports round-robin and weighted round-robin scheduling algorithms. WeeOs if fully configurable. The scheduling algorithm and the hardware device can be set in the Makefile.
Supported Hardware
Built With
Getting Started
To get a local copy up and running follow these simple steps.
Prerequisites
Install the prerequisites. Here is how to do it on Arch Linux.
- GNU ARM Embedded Toolchain
sudo pacman -S arm-none-eabi-gcc
- OpenOCD
sudo pacman -S openocd
- Packages for building, this is different for every distro. It includes things like GNU Make.
sudo pacman -S base-devel
Building WeeOs
- Clone the repo
git clone https://github.com/puranjaymohan/wee-os.git
- Get inside the wee-os directory
cd wee-os
- Generate the config.mk file
chmod +x configure.sh ./configure.sh
- Edit config.mk to choose your hardware and scheduling algorithm.
#WeeOs Configuration File #Please edit this file to configure WeeOs #Name of the generated elf file PROJECT := main #Device for which the project has to be made #Available Devices: stm32l476rg lm3s811 MK64F12 TM4C123GH6PM DEVICE := stm32l476rg #Scheduling Algorithm used in the App #Available scheduling algorithms: round-robin weighted-round-robin SCHD_ALG := round_robin
- Run Make to build the final elf file.
make
- Run OpenOCD in another terminal for your hardware.
openocd -f /usr/share/openocd/scripts/board/st_nucleo_l476rg.cfg
- Run GDB and upload the elf file to the target.
arm-none-eabi-gdb build/main.elf -x scripts/gdb_commands
Usage
Source Code
The repository is divided into 3 main sub directories: src, device, and scripts. The src directory includes two directories: App and Kernel. The App directory has the main.c file and all other supporting files required for the user's application. The Kernel directory has all the WeeOs files. The device directory has hardware specific filed like linker scripts etc. The scripts directory has some useful scripts.
├── device
│ ├── lm3s811
│ ├── MK64F12
│ ├── stm32l476rg
│ └── TM4C123GH6PM
├── images
│ └── logo.png
├── LICENSE
├── Makefile
├── README.md
├── scripts
│ ├── checkpatch.pl
│ └── gdb_commands
└── src
├── App
└── Kernel
Using it in your project
To use WeeOs in your project just setup WeeOs using the steps above. Add your code to src/App. You can add .c .h or .s files in the src/App folder and they will be compiled, assembled, and linked automatically while running make. To create, add, kill tasks or use any other WeeOs feature, include the #include <weeOs.h>
in your source file.
To understand the usage of the WeeOs API have a look at API Documentation.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Puranjay Mohan - [email protected] Abhay Chirania - [email protected]
Project Link: https://github.com/puranjaymohan/wee-os