[TUT][SOFT] RTOS for AVR

Last post
41 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Somewhat related are Adam Dunkels ProtoThreads at http://www.sics.se/~adam/pt/ . From the website:

Quote:
Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C.

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Femto OS is another RTOS for AVR architecture.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure if I can post a question here, but why would someone want an operating system for an AVR, a microcontroller? Could someone here who uses such please explain, as I'd never considered such a thing but would like to understand the motivation.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

why would someone want an operating system for an AVR, a microcontroller?

Here we go again.. Just do a search here at AVRfreaks on RTOS and similar and you will find more pro's and con's than you actually care about.

Oh, well... I am not necessarily ruling in OSes in all cases for AVRs (I'm not that stupid). But I can easily think of situations where it would help.

What if you want to run several parallell processes where some need to be higher prioritized than others? What if you want to want TCP/IP connectivity? What if you want to access an IDE hard disk with a FAT file-system? Sure you can say that you can write code for those without having an operating system, but then we'd just be playing with words.

Once upon a time I used machines with 64KB of RAM (for both program and data, Von Neumann architechture) that ran operating systems that where more complicated than several of the "small footprint" RTOSes for AVRs that are out there. The biggest AVR has 256 KB of (program) FLASH and 8KB of (data) RAM...

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I often think there's a limit (somewhere between 32K and 64K but not exactly sure where) at which program complexity probably becomes so great that there's a call for multi-tasking but it could be as simple as non-premeptive, perhaps even just protothreads.

Cliff

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is the conditions to the OS be inclided to this list?

I know about two another free OSes
scmRTOS (is a C++ cooperative OS with Mit license) http://scmrtos.sourceforge.net/
and iRTOS (is a C preemptive OS with LGPL license ) http://irtos.sourceforge.net/

I am writing RTOS may be someone will look at it ;-)
http://sourceforge.net/projects/irtos/
http://irtos.sourceforge.net/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, it's not correct. scmRTOS is preempteve OS.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I've found another one.
http://www.embedded.com/shared/-printableArticle.jhtml?articleID=190302110

They call it SST (Super Simple Tasker) and it's about as simple as protothreads. They also call it preemptive but I think it's "only" cooperative. It's about 500 bytes in size (on a x86) and completely written in C.
It is not specifically written for AVR, but I believe it's easy to port.

Have Fun, Paul.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is actually a port for that in the projects section! But you are correct it is not on the list.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

uCOS-II is another for AVR Architecture

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Folks, can you give URLs when you mention a missing OS that isn't in the list above then I'll edit the link into the first post. Ta.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please correct the definition of the scmRTOS. It is preemptive, not cooperative.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the list - are you able to put the licence after each one - the last two are ideal:

Quote:

scmRTOS: a C++ cooperative OS with Mit license

iRTOS: a C preemptive OS with LGPL license

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks for that list. But can anyone tell me, which one RTOS for AVR that use BASIC programing language? please help me

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try this:

RTOS for Bascom

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Try this:

RTOS for Bascom

Thanks for your reply Clawson but i already know that script, its not a real RTOS, its just split the procedure into stacks and make priority for task in order every millisecond.
That i want to know is how to make more than one procedures to work simultaneously.
But really i appreciated for your help, thanks,
Do you have any ideas,links,etc?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Do you have any ideas,links,etc?

Yes switch to C then pick one of the 20+ listed above ;-)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is supposed to be tutorial, but all I can see is a list of links. There should be some tutorial in this forum, which explains what RTOS is, what is thread, preempting, etc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To my mind there's no better tutorial about a specific RTOS than the explanation of how the AVR implementation of FreeRTOS works:

http://www.freertos.org/implementation/index.html

The concepts explained there apply pretty much the same whatever RTOS you actually chose to use though there specific implementation may differ slightly.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you. Looks good.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is our port for FreeRTOS to the ATMega168, 328, 644, 1280 and 1284:

http://robotgroup.com.ar/noticias/20091102/duinos-sistema-operativo-multitarea-para-arduino

It was made to be integrated with the Arduino IDE, but could be used alone or with other IDEs (we often use Code::Blocks internally).

Regards,
Julián

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:

http://www.embedded.com/shared/-printableArticle.jhtml?articleID=190302110

They call it SST (Super Simple Tasker) and it's about as simple as protothreads. They also call it preemptive but I think it's "only" cooperative.

SST is a fully preemptive, prioritized RTOS. I have spent a good deal of time over the decades on embedded software and different RTOS's, both commercial and had-rolled. My current favorite is SST. Very light weight, easy to prove correct. Conceptually simple.

So many of the commercial products seem to have a less than required quality, with defects in systems due to the RTOS - why did I buy one if I have to troubleshoot it? I have grown to believe
smaller + simpler = better. SST fits the bill.

DavePed

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've very surprised that no one mentioned NUTOS
http://www.ethernut.de/en/firmware/index.html

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ChibiOS from Giovanni de Sirio.

http://chibios.sourceforge.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, the link to download DuinOS (the port of FreeRTOS to Arduino) had changed to this:

http://robotgroup.com.ar/duinos/wiki

There you will find (in the downloads section) the v0.1 and the v0.2 versions.

Regards,
Julián
http://robotgroup.com.ar

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is Abassi also. It's preemptive and super small (like <800 bytes small)...

http://www.code-time.com/avr.html
http://www.code-time.com/portdocs.html

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
iRTOS: a C preemptive OS with LGPL license

This is not related to AVR

Quote:
This project is supporting LPC2000, LPC17xx series MCU made by NXP.

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

This is not related to AVR

Thanks - removed from list now.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Add Pumpkin's Salvo to the list, it's a cooperative RTOS, both the Tiny version and Lite versions are free and fairly easy to use, a good manual can be downloaded as well. I added a project to show how to set up the tiny version on a Mega16 with lots of flash available.
-jim

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does anyone know the status of AvrX?
This link is not helpful anymore:
AvrX: Real-Time Kernel for AVR processors

Not surprisingly Google will also send you into 404 pages, sometimes via another page.

Einar Sjaavik

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

duinoOS link in first post is also death
its better link on GIT or WIKIpedia (there is also death link but on Wikipedia is also link on 0.2 which is maintaned with other person)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The duinOS link doesn't work, it seems it has been relocate to http://code.google.com/p/duinos/

Alex

[first post edited]

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just checked the complete list, there are three more that need to change:

AVRx site is also down (there is only info that it is not maintained any longer, no OS there) so the best alternative seems to be sourceforge http://avrx.sourceforge.net/

Adam Dunkel's Protothreads site exists but the link has changed to http://dunkels.com/adam/pt/

Contiki link seems to not work any longer but a search lead to http://www.contiki-os.org/

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TinyRealTime by Dan Henriksson and Anton Cervin (Lund University)
Characteristics:
1. Originally created for mega8.
2. Preemptive kernel.
3. Earliest Deadline First (EDF) scheduler.
4. Each task has a stack.
5. About 1200 bytes of flash.

It was extended by Dr. Bruce Land to mega644 and mega1284; cross-links between the 2 URLs.
A preemptive kernel for Atmel Mega1284 microcontrollers by Bruce Land (Cornell University, ECE4760; October 18, 2013)
A video of a presentation of it in ECE4760:
#19 -- Premptive Kernel and Lab 4 (Bruce Land, YouTube)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a very useful list for some one like me looking to get started with AVRs however looks like some these are not existing any more. Guess this need a clean up?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

This is a very useful list for some one like me looking to get started with AVRs

Perhaps. Most beginners don't need, or will not be helped, by an RTOS. Same for many AVR apps.

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Guess this need a clean up?

You tell me which links are dead and I'll edit my post.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i just looked at the first few links...out of which the 2,3 arent related anymore.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are probably 25-50 scheduler/OSes for AVR.

I have a collection.