An Arduino Library for Nil RTOS

Discussions and support about ChibiOS/NIL, the almost nil RTOS.
wgreiman
Posts: 33
Joined: Sun Oct 23, 2011 3:21 pm
Been thanked: 2 times

Re: An Arduino Library for Nil RTOS

Postby wgreiman » Sat Jul 20, 2013 11:57 pm

I have ported the latest Nil RTOS files to Arduino as NilRTOS20130720.zip http://code.google.com/p/rtoslibs/downloads/list.

Here is a post with more information http://forum.arduino.cc/index.php?topic=178532.0.

I have included an SD FAT library I wrote for Arduino, a Nil friendly I2C library, and ADC library.

ryan
Posts: 1
Joined: Mon Oct 14, 2013 10:13 pm

Re: An Arduino Library for Nil RTOS

Postby ryan » Mon Oct 14, 2013 10:48 pm

I'm new to the whole RTOS way of doing things, but have successfully put together a "project" with 4 threads on a ATmega328P (think Arduino Uno). When trying to add another thread I run into freezes and crashes which I can only assume mean I'm running out of heap space to run it all.

Since I've never had to give much thought to how much memory to allocate to each thread or what size the whole heap is before, can anyone point me in the right direction to figure out more accurately how much memory to give each thread? And how to know when I'm running up against the limit of available RAM?

Thanks in advance for any pointers!

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: An Arduino Library for Nil RTOS

Postby Giovanni » Mon Oct 14, 2013 11:09 pm

64 bytes is a good start usually for threads that do not call anything from their function, if you call complex functions from your thread then try 128 or 192.

Note that Nil is static, it does not allocate memory at runtime, it is a good idea to look at the .map file for details.

Giovanni

colin
Posts: 149
Joined: Thu Dec 22, 2011 7:44 pm

Re: An Arduino Library for Nil RTOS

Postby colin » Tue Oct 15, 2013 9:54 pm

ryan wrote:I'm new to the whole RTOS way of doing things, but have successfully put together a "project" with 4 threads on a ATmega328P (think Arduino Uno). When trying to add another thread I run into freezes and crashes which I can only assume mean I'm running out of heap space to run it all.

Since I've never had to give much thought to how much memory to allocate to each thread or what size the whole heap is before, can anyone point me in the right direction to figure out more accurately how much memory to give each thread? And how to know when I'm running up against the limit of available RAM?

Thanks in advance for any pointers!


If you haven't already, make sure you enable all the ChibiOS/RT debugging options in the chconf.h file. On an ARM platform with a JTAG debugger, you would be able to inspect a special location in memory where ChibiOS/RT puts information about an error when an assertion fails, but I don't know how you can do this on an ATmega328...

Tommino
Posts: 7
Joined: Thu Sep 20, 2012 1:16 pm

Re: An Arduino Library for Nil RTOS

Postby Tommino » Fri Nov 08, 2013 12:15 pm

Hello,

is there any short-term plan to have latest NilRTOS version also for AVR, resp. directly for Arduino? I was trying to compile repository Nil version with help of old nilcore file(s) for AVR and it was not easy and I didn't finis it. Is somebody working on it already?
Thanks a lot!

Best regards,
Tommino

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: An Arduino Library for Nil RTOS

Postby Giovanni » Fri Nov 08, 2013 1:34 pm

Hi,

The Nil has been merged with ChibiOS 3.0, the AVR port is missing right now but it is the next thing I will add, I imagine then Bill will update his excellent libraries using the new code.

Giovanni

Tommino
Posts: 7
Joined: Thu Sep 20, 2012 1:16 pm

Re: An Arduino Library for Nil RTOS

Postby Tommino » Fri Nov 08, 2013 3:51 pm

Hi Giovanni,

it sounds good, thanks.
-Tommino

Jim Ford
Posts: 1
Joined: Fri Dec 20, 2013 11:33 pm

Re: An Arduino Library for Nil RTOS

Postby Jim Ford » Mon Dec 23, 2013 11:55 am

What's the current status of NilRTOS, please?

I've been looking at nilRTOS20137020 and have a few questions to ask. I've posted them on the Arduino forum, but so far not had a response.

Has development of NilRTOS on the AVR petered out?

Jim

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: An Arduino Library for Nil RTOS

Postby Giovanni » Mon Dec 23, 2013 2:25 pm

Hi,

As far I know the development of Arduino libraries is still ongoing, the author posted here just yesterday about it.

memberlist.php?mode=viewprofile&u=200

If you have general questions about Nil, not specific to Arduino, you may ask here too.

Giovanni


Return to “ChibiOS/NIL”

Who is online

Users browsing this forum: No registered users and 30 guests