views:

1486

answers:

16

It does not need to be a full fledged OS, but at least have multitasking capabilities (i.e. a scheduler).
Please mention what processor architecture it works on.

This is a survey, so exact capabilities are not really important. Think of this as being a place to look at for possibilities when your next 8-bit embedded project comes up...

I realize that most 8-bit micro do not require an OS, but just as a counter-example, Rabbit Semiconductor offers the RCM3710 processor module with 4 serial ports, a 10-BaseT ethernet port, 512K RAM and 512K Flash. All that for $39. All based around an 8-bit Z80 core.

8-bit does NOT necessarily mean extreme resource constraint.

+3  A: 

I believe Contiki will work. Adam Dunkels does some really cool stuff.

It runs on a lot of platforms, including the Commadore 64.

http://www.sics.se/contiki/

Tom
+2  A: 

Rabbit Semiconductor has a port of the MicroC/OS II for their processors.

Benoit
A: 

I wrote one a few years ago for the Z80 but the z80 doesn't support hardware multitasking or paging, multitasking is possible but your freedom is pretty limited you have to roll with stuff like like no absolute jumps or different start positions in different programs

Jacobbus
+3  A: 

This might be an unusual point of view, but I would strongly recommend to think twice and even thrice before deciding to use an OS for a 8-bit computer. OSes are for complex application needs, and 8-bit CPUs are not the best choice for these tasks.

I'm not saying that an OS should never be used for a 8-bit, just that there's less chance that it is the best solution.

Eli Bendersky
I completely agree! But keep in mind that I'm more interested in collecting possible OSes. We'll put this down as no OS :-)Also keep in mind that some 8-bit processors allow 512K or even 1M of RAM space...space for complex enough...
Benoit
A: 

Softools also provides a OS (called TurboTask) for the Rabbit Processors.

There is a library that provides basic task scheduling for the Rabbit. The library works with the Softools compiler, but not the rabbit compiler.

Benoit
The Rabbit development environment includes uC/OS-II. It was previously sold separately, but is now included with the base compiler.
tomlogic
A: 

I have some difficulty in envisaging the type of 8-bit processor you're planning to use here - basically if it's anything powerful enough to run anything like an OS (an H8, for example), you'll almost certainly find that an ARM-cored micro is going to be just as cheap.

Will Dean
Just as cheap, but perhaps more power hungry?
+3  A: 

What's the goal here? Embedded OSes tend to cost a lot. (MicroC/OS II, etc)

It sounds like you may be putting OS support ahead of what I consider more important things when it comes to device selection. You should know the general design patterns for the platform you are working on. Don't try to shove PC concepts into the tinyiest of embedded chips like this.

OMFG... Java does NOT belong on an 8 bit processor. I actually tried that Maxix/Dallas DS80C400 chip. It had a simplified OS (read: scheduler) and TCP/IP stack baked on chip, and it looked great on the datasheet. It was a complete disaster. Slow, slow, slow!

I ended up with an FPGA-based soft processor and soft MAC. No OS... Worked great. Once a FIFO bug actually sent packets out so fast that every Windows PC on the network locked up solid handling interrupts (even the mouse locked) until I pulled the power on the dev board.

I've personally found it fairly difficult to write so much code for an 8 bit processor that you even NEED an OS. I'm sure some applications/situations may make it more desirable than I've seen. The only use for an OS that I've found is when you have some complex device with device drivers for a specific OS that you'd like to use, and then it's not a "general OS" question anymore.

Get familiar with the ever-so-common 1ms timer tick + "volatile char g_TASKS[]" global flag list + a simple main() loop that checks task flags and calls subroutines. State machines are your friend. You'll have a much better handle on how your system is going to run. These are the design patterns of 8 bit processors.

Any time you need task A to wait for task B to complete, then add a state machine state to task A, and have task B set that state... or something along those lines.

A much more useful (IMHO) list would be of good 8 bit processors to use, not OSes. Here would be my criteria: low power, excellent debugging (OCD), excellent development environment (or just Eclipse integration), low cost, good C compiler support, and general stability of the debugging platform/debugger/etc.

darron
On one project, I had a AVR Atmega16, that was doing many things at once including UI (LCD+knobs) and radio messages. It was a mess until I've switched to a OS (FreeRTOS, in this case). It's an abstraction level that greatly simplifies your code and reduces potential errors.
ziggystar
I think it's mostly an exercise in using good patterns. A main loop that does nothing but check flags and call task-specific subroutines is sort of a primitive scheduler. The rest is discipline... the OS enforces some abstractions that you should have already anyway. It then almost invariably goes further and enforces stuff you don't need. There's no reason what you describe couldn't be contained in subroutines from main called "process_ui()" and "process_radio()". (expanding as needed)
darron
Take an OS which expects you to write drivers for say the LCD, knobs, and radio. That can clean up some spaghetti code, but then so can just cleaning it up by moving functions to "lcd_*", "knob_*", and "radio_*" access functions. Think about encapsulation, it's important. It's a whole lot better in my opinion to develop solid design processes and patterns that work for ANY microcontroller you use (which makes your code more portable) than to use half a dozen RTOSes for the dozen different micros you're using. (Or pay insane fees for the bigger RTOSes which work almost everywhere)
darron
I think there's definitively a difference between the state-machine approach and (preemptive) multitasking. No artificial preservation of the state across calls. This can get rid of a LOT of nasty stuff - it's simply gone (if you can pay the price, that is performance + memory).
ziggystar
Well, true. This is probably down to developer preferences... objectively they both sound like fair approaches. Personally, the avoidance of an added dependency and being able to use the same patterns everywhere are way more important to me. An OS needs to give me a huge benefit to entice me to use it... I do use TI's DSP/BIOS, for example. The integration with the IDE (among other things) is awesome. On most other processors I don't use an RTOS. Being required to work with a wide range of processors has something to do with it. If I almost always used AVR say, I might go with the RTOS.
darron
+1  A: 

There is also Uzix, for the MSX based (z80) computers, a Unix Like, Posix Compliant, multi-tasked, preemptive and with a TCP/IP stack implemented.

+3  A: 

FreeRTOS

JeffV
+1  A: 

I have used uC/OS on an Z180 (8bit machine). I had to port to our custom banked memory model. But otherwise was great, especially having a detailed book describing all the functionality. And even though it was a RTOS, we still had to use threads etc. very sparingly.

simon
+2  A: 

To those suggesting state machines in place of an OS because they have little overhead, you might want to check out Contiki. It is very small and free. It doesn't have a traditional threading model, instead it uses ProtoThreads: http://www.sics.se/~adam/pt/.

ProtoThreads give you something approximating threading semantics without the overhead of a real OS with multi stacks, etc... As a bonus, you don't need any sort of OS to use them Contiki or otherwise.

We've used them on one project with great success. They really make writing complicated code much easier.

Tom
A: 

HI-TECH Salvo - HI-TECH Salvo features is a cooperative, event-driven, priority-based multitasking RTOS. It is for processors with severely limited RAM (< 256 bytes), works within a hardware call; return stack of 8 levels or less, supports 16 separate dynamic task priority levels, and provides inter-task communication and synchronization, ISR-to-task communication and resource sharing. It is extremely small RAM and ROM footprint, no PUSH/POP stack or stack pointer required, ROMable and extensible. Low interrupt latency, fast context switching, and portable - written in ANSI C, with minimal compiler.

A: 

Salvo - The RTOS that runs in tiny places(TM). - Salvo's modest ROM and miniscule RAM requirements mean that you can have event-driven, priority-based, multitasking applications in nearly any single-chip microcontroller, with plenty of room left for your application. With Salvo, you can: Implement new designs quickly * Enhance functionality using existing resources * Improve real-time performance * Multitask.

could you combine this answer with your previous one. You are talking about the same thing...
Benoit
+1  A: 

This is probably not what you want, but for MSX and Armstrad there is absolutely amazing GUI OS called SymbOS (http://www.symbos.de/). What's amazing about it, is that it was entirely made by one german guy called Prodatron (http://www.prodatron.net/). It has real multitasking and many applications what you would expect from modern OS:

  • SymCommander - Norton Commander clone.
  • SymPlay - video player, videos have to be preprocessed, but after that they run very smooth and simultanously with other applications.
  • SymSee - picture viewer, again pictures must converted into CPC format first.
  • SymAmp - music player, supports tracker modules and even MP3-s with special hardware.
  • Calculator, Minesweeper, Control Panel etc.

I've seen it demoed by it's author and the only comment from audience was "You must be grazy!". Nobody had ever seen such features on 8-bit MSX computer before.

Tambet
A: 

Back in the mid 70s I wrote, and in 1982 I stopped shipping an 8 bit OS (SDOS) for Motorola 6800/6801/6809. Those OSes came in several flavors:

  • Real Time multithreaded (2Kb ROM + whatever RAM you wanted)
  • Single user Disk Operating System (64K memory max)
  • Multiuser Timesharing (15 users in 1Mb of RAM using 65Kb banks of memory, one per user)
  • Distributed OS (Single or Multiuser system with access to remote disks)

Where were you when I needed a customer? (I gave it up when it became clear that IBM chose Bill Gates by lightning bolt to be Microprocessor OS king).

Ira Baxter
A: 

HACK-RTOS for Zilog eZ8, eZ80 and ZNEO microcontrollers

Alex