- Notifications
You must be signed in to change notification settings - Fork3
rahra/minios
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Arduino MiniOS is a tiny multi-tasking operating system for Arduino. It wasdeveloped during a course focusing on assembler programming and operatingsystem internals.
This operating system currently serves demonstrational purpose and is notthought to be a mature OS for productional use. Although it can and probablywill be enhanced and further developed.
You may also have a look atAVRShell whichis a far more mature version of this.
The core components of MiniOS is a dispatcher (context_switch()
) and adumb scheduler (get_next_proc()
). Both are implemented in the fileprocess.S
. The time slices for context switching are defined by the T0timer interrupt, every ~16ms on a 16 MHz Arduino board. The code is found intimer.S
. This file additionally contains an uptime counter which is usedin the functionwait()
inledproc.c
which sleeps a specific numberof time slices.Process.S
also contains the function to start newprocesses (start_proc()
). After system initialization a single task(main()
) is started by the OS (see below). All other processes have to bestarted subsequently bymain()
or its sub-processes by callingstart_proc()
.
The fileserial_io.S
contains the code for complete interrupt drivensending and receiving of data on the serial line. In this case it is used for atiny command line interface (which actually does not know any commands at thecurrent stage of development ;) ).
The system is initialized ininit.S
. This is initializing the interrupts,the timer and all registers and starts the first initial task which ismain()
located in the filemain.S
.Main()
can then start further child processes.
Currently two processes are running:main()
which implements the commandline and serial communication andled_proc()
which toggles the LED onthe Arduino board. The latter is implemented in C to show the interferencebetween C and Assembler on AVR by following thecalling conventions accordingly.
Arduino MiniOS is developed and maintained by Bernhard R. Fischer,4096R/8E24F29Dbf@abenteuerland.at. You may alsofollow me on Twitter or read mytech and society blog.You may also have a look atmy collection of Arduino materials.
Feel free to contact me :)
This code is completely free. Do what every you like with it and buy me a beer.