I am looking for a simple to use OS (not necessasarily a RTOS). Can u point me somewhere pls. All I'm looking for is data sharing and multitasking.
admin's test signature
Check out the tools section. They list several RTOS there. Some are free, some are not.
I highly recommend Larry Barello's excellent AvrX RTOS.
Check it out at http://www.barello.net/avrx/
There is also a nice yahoo group for support.
Would you recommend it today?
An 8 bit microprocessor is no place for a real time operating system,it simply does not have the resourses.The only reason you might want to try to use one is to learn how proper RTOS's are written and the problems associated with them.No real world application using an 8 bit processor will ever require an RTOS.
RTOS's are nice in that the OS maintains state information for the programmer. So, instead of a complicated state machine for each task, running off an interrupt timer, the designer can write linear code (do this, wait for something, then do that... etc). In general the linear code is much easier to design, debug, understand and it is almost always smaller.
Ooohh oh someone bring a saucer of milk
The search on here is not working - it only finds things over about 4 years old. The thread you found is ancient. For an "RTOS" on the AVR people tend to use www.freertos.org which has an AVR port available (two different C compilers).
but there's some merit in what Jez says, an RTOS doesn't make a lot of sense on anything but the biggest AVRs (apart from anything else task TCBs *eat* the RAM!)
There are some cooperative OS's (like AvrX itself) that can fit perfectly the bill. For the big guyz like M64, I mean. Not much RAM needed, and capable to do many programs that can be really 'complex' if you rely only on interrupts and state machines. I had learned it the hard way with my last project. Something like AvrX would save me many headaches.
"Common sense is the least common of the senses" Anonymous.
I am sorry about the search function. I have been looking at FreeRTOS and AvrX and leaning at AvrX because I felt it would take less time to get up to speed than FreeRTOS however I have also been looking at the Atmel Arms down the road and am internally debating one steep learning curve over two separate ones. Since I have some short term '8 bit micro' stuff I need to get done I will probably leverage AvrX instead of scratchbuilding.
Thanks for the input.
The usual question on 8 bit micros re RTOSes is whether an RTOS is needed at all. If this is for educational purposes, the question is moot.
IMO, a justification for the use of an RTOS on 8 bit micros is very rare.
a state machine is super easy to implement (function pointers in C). And very predictable and easy to debug and prove correct for all cases. A small step from this is cooperative multitasking - good for micros since you need only one stack and RAM is not plentiful.
E.g., source for https://www.avrfreaks.net/index.p...
My main objection to an rtos on an 8 bit processor is that you are using software to do context switching and task scheduling, using up valuable resources, when you already have a prefecly functional multitasking system which does all the context switching and scheduling for you and its called the interrupt.
You can also look at SST.
No preemption, no multiple stacks...
In my opinion, Interrupts are not quite good to work long routines, while tasks can do perfectly well.
On the other hand, cooperative RTOS (I don't think cooperative OS is really a real time one) are pretty simple and straght forward for this. And there is a pretty small one that you can find in AVR constest from circuit cellar.
In my opinion, Interrupts are not quite good to work long routines, while tasks can do perfectly well...
This is why (in the introduction to the SST) it is clearly stated that SST is well suited to "run to completion" tasks (like classic finite state machine implementations).
For me in the environment with very limited resources (like AVR) there is no such (RT)OS which will fit for all projects/purposes, so having more than one tool allows to better fit our design for given project.
Nice link and project. Although I have no time to check it now, I would read it deeper this weekend. Seems interesting.
Right now I'm trying to write my own small cooperative OS, to use it in my next commercial development. Rigth now, I had developed two products ATmega based that work perfectly withou OS, but now I'm finishing another that had been a real pain to debug due many state machines and so on. That way I found out that developing it under some OS would be way faster, shorter and easy, altough I would run short of RAM (I'm already out of it). And that's why I can say that for 'big projects' (M128, up to 110KBytes of code, 3.5KBytes of RAM used) OS's are really handy.
© 2020 Microchip Technology Inc.