Giter Club home page Giter Club logo

m0s's Introduction

M0S

1KB Cortex M0 Real Time Operating System

Full blown RTOS written in Thumb ARM assembly language to fit in 1024 bytes. It supports the following features:

  • real time preemptive scheduling
  • system tick counter
  • idle task (which acts as memory janitor and combines consecutive free blocks)
  • task creating
  • task killing
  • task sleeping
  • mutexes (with blocking or non-blocking functionality)
  • malloc and free
  • IPC - inter-process communication

It was written for the Hackaday 1KB contest : https://hackaday.io/contest/18215-the-1kb-challenge

Later Edit: It won first place in the contest : http://hackaday.com/2017/01/13/1-kb-challenge-and-the-winners-are/

Where is it ?

All functionality of M0S is in m0s.asm file. It was written using unified syntax and compiled with GNU assembler for ARM. There are some hard coded constants available in stm32f072.inc.

How to Build ?

Use one of the two shell scripts included :

  • build_os_only
  • build_demo

You have to edit them to replace the path of the ARM tools (as, gcc, ld, objcopy) according to your setup. You can also use the included Makefile. By default it builds the OS only. You have to uncomment and comment two lines inside to build the demo. Instructions are provided in the Makefile. You build by issuing "make" command. There is also a "make gdb" command which launches the debugger.

You will see a text message displaying the size of the actual code from the .elf file like this:

text	   data	    bss	    dec	    hex	filename
1024	      0	      0	   1024	    400	m0s.elf

.text section will become .bin file which is also generated by the build commands

How to use ?

I used a NUCLEO-F072RB board from ST Micro for testing. If you want to use a different microcontroller you will have to change the peripheral addresses and OS details in stm32f072.inc to match your Cortex-M0 system.

What does the demo do ?

Currently the demo plays with tasks and blinks two LED lights on the board, one already present on the board and one added externally:

GPIOA pin 5
GPIOB pin 5

Video Documentation

M0S Video documentation

License ?

This software is being distributed as "Public Domain". You can do whatever you want with it, use it, sell it, buy it, eat it, juggle it, you name it. There is a catch though, I will not be held responsible for anything resulting from you doing those things to this code. You are on your own !

I might be able to reply if you write me a message (I usually do if you are a polite person) but this feature is totally up to me and it should not be considered as "support for m0s".

m0s's People

Contributors

dumitru-stama avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.