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.
An Arduino Library for Nil RTOS
Re: An Arduino Library for Nil RTOS
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!
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!
- 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
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
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
Re: An Arduino Library for Nil RTOS
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...
Re: An Arduino Library for Nil RTOS
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
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
- 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
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
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
Re: An Arduino Library for Nil RTOS
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
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
- 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
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
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
Who is online
Users browsing this forum: No registered users and 30 guests