Skip to content

A small RTOS for ARM Cortex-M3/M4 based Microcontrollers.

License

Notifications You must be signed in to change notification settings

puranjaymohan/wee-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn Build Status Lines of code GitHub release (latest by date)


Logo

A tiny RTOS for ARM Cortex-M3/M4 based Microcontrollers.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. 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

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

  1. Clone the repo
    git clone https://github.com/puranjaymohan/wee-os.git
  2. Get inside the wee-os directory
    cd wee-os
  3. Generate the config.mk file
    chmod +x configure.sh
    ./configure.sh
  4. 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
  5. Run Make to build the final elf file.
    make
  6. Run OpenOCD in another terminal for your hardware.
    openocd -f /usr/share/openocd/scripts/board/st_nucleo_l476rg.cfg
  7. 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.

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.

  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 - [email protected] Abhay Chirania - [email protected]

Project Link: https://github.com/puranjaymohan/wee-os

Acknowledgements