Nil RTOS
Nil RTOS
Author
Giovanni Di Sirio - Nil RTOS Base System
Bill Greiman (fat16lib.sbcglobal.net) - Port to Arduino

About Nil RTOS

Giovanni Di Sirio describes Nil RTOS as "Smaller than ChibiOS/RT, so small it's almost nil".

I, Bill Greiman, decided to try Nil RTOS on an Arduino Uno. The initial results are very promising so I am posting this early test version.

Nil RTOS is in development, Giovanni calls it untested so there are bound to be problems. Please don't bother Giovanni, he is busy with ChibiOS/RT. I will attempt to solve problems with my port of Nil RTOS to Arduino.

Documentation and Examples

The Modules, Data Structures, and Files sections were generated from the source and should be useful.

Please read the Examples page and try the examples. Be sure to read the Understanding the Examples section on the Examples page.

To try Nil RTOS, copy the NilAnalog, NilRTOS, NilTimer1 and TwiMaster libraries to your Arduino libraries folder. NilAnalog and NilTimer1 are in separate folders to avoid linking ISRs when functions are not used.

The TwiMaster library can be used with Nil RTOS or in standard Arduino sketches. When used in Nil RTOS, the calling thread sleeps while I2C transfers take place.

The TwiMaster library has a native API which allows transfers larger than the Standard Wire library. A compatibility Wire style API is also included. The libraries/TwiMaster/examples/twiWireRtc example demonstrates this interface.

TwiMaster has options for speeds of 100 kHz or 400 kHz in begin(). The function Wire.speed(I2C_400KHZ) selects 400 kHz in the Wire style API.

Please look at the TwMaster class documentation and examples for more information.

You should also use the included SdFat library with the data logger examples unless your SdFat library is newer than 20130201.

The included SdFat library has a faster data formatter than the standard Arduino Print. the new SdFat printField(uint16_t) function is about three times faster than Print(uint16_t). You can run the SdFat PrintBenchmark example to see the difference.

Nil RTOS is like any other Arduino library. Just click on the IDE File tab and go to Examples -> NilRTOS in the menu. Try the nilBlink example first.

Please ignore the Kernel Concepts page. I have just started to edit it.

Also ignore my TODO notes.

Related pages