# wee-os
**Repository Path**: dange222/wee-os
## Basic Information
- **Project Name**: wee-os
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-02-21
- **Last Updated**: 2025-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![Build Status][travis-ci-shield]][travis-ci-url]
[![Lines of code][lines-of-code-shield]][lines-of-code-url]
[![GitHub release (latest by date)][release-shield]][release-url]
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
-
Getting Started
-
Usage
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
## 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
* [ST NUCLEO-L476RG](https://www.st.com/en/evaluation-tools/nucleo-l476rg.html)
* [TI EK-TM4C123GXL](https://www.ti.com/tool/EK-TM4C123GXL)
* [Qemu lm3s811evb](https://wiki.qemu.org/Documentation/Platforms/ARM)
* [NXP MK64F12](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k6x-ethernet/kinetis-k64-120-mhz-256-kb-sram-microcontrollers-mcus-based-on-arm-cortex-m4-core:K64_120)
### Built With
* [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
* [CMSIS](https://www.arm.com/why-arm/technologies/cmsis)
* [OpenOCD](http://openocd.org/)
* [GNU Make](https://www.gnu.org/software/make/)
## 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
```sh
sudo pacman -S arm-none-eabi-gcc
```
* OpenOCD
```sh
sudo pacman -S openocd
```
* Packages for building, this is different for every distro. It includes things like GNU Make.
```sh
sudo pacman -S base-devel
```
### Building WeeOs
1. Clone the repo
```sh
git clone https://github.com/puranjaymohan/wee-os.git
```
2. Get inside the wee-os directory
```sh
cd wee-os
```
3. Generate the config.mk file
```sh
chmod +x configure.sh
./configure.sh
```
4. Edit config.mk to choose your hardware and scheduling algorithm.
```sh
#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
```
5. Run Make to build the final elf file.
```sh
make
```
6. Run OpenOCD in another terminal for your hardware.
```sh
openocd -f /usr/share/openocd/scripts/board/st_nucleo_l476rg.cfg
```
7. Run GDB and upload the elf file to the target.
```sh
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.
```sh
├── 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 ` in your source file.
To understand the usage of the WeeOs API have a look at API Documentation.
[API DOCUMENTATION](https://github.com/puranjaymohan/wee-os/blob/master/APIDOC.md)
## Roadmap
See the [open issues](https://github.com/puranjaymohan/wee-os/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**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Puranjay Mohan - puranjay12@gmail.com
Abhay Chirania - abhaychirania2411@gmail.com
Project Link: [https://github.com/puranjaymohan/wee-os](https://github.com/puranjaymohan/wee-os)
## Acknowledgements
* [Operating Systems Lectures IITD](http://www.cse.iitd.ernet.in/os-lectures)
* [Build Your Own RealTime OS (RTOS) From Ground Up™ on ARM 1](https://www.udemy.com/course/rtos-building-from-ground-up-on-arm-processors/)
[contributors-shield]: https://img.shields.io/github/contributors/puranjaymohan/wee-os.svg?style=for-the-badge
[contributors-url]: https://github.com/puranjaymohan/wee-os/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/puranjaymohan/wee-os.svg?style=for-the-badge
[forks-url]: https://github.com/puranjaymohan/wee-os/network/members
[stars-shield]: https://img.shields.io/github/stars/puranjaymohan/wee-os.svg?style=for-the-badge
[stars-url]: https://github.com/puranjaymohan/wee-os/stargazers
[issues-shield]: https://img.shields.io/github/issues/puranjaymohan/wee-os.svg?style=for-the-badge
[issues-url]: https://github.com/puranjaymohan/wee-os/issues
[license-shield]: https://img.shields.io/github/license/puranjaymohan/wee-os.svg?style=for-the-badge
[license-url]: https://github.com/puranjaymohan/wee-os/blob/master/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/puranjaymohan
[travis-ci-shield]: https://img.shields.io/travis/com/puranjaymohan/wee-os?style=for-the-badge
[travis-ci-url]: https://travis-ci.com/puranjaymohan/wee-os
[lines-of-code-shield]: https://img.shields.io/tokei/lines/github/puranjaymohan/wee-os?style=for-the-badge
[lines-of-code-url]: https://github.com/puranjaymohan/wee-os
[release-shield]: https://img.shields.io/github/v/release/puranjaymohan/wee-os?style=for-the-badge
[release-url]: https://github.com/puranjaymohan/wee-os/releases