PDA

View Full Version : Propeller UNIX System?



Aaron193
07-07-2009, 09:23 AM
Hi, everyone.

I've been thinking recently what I can possibly do with a Propeller setup involving a keyboard and a 2x16 LCD Display. I have successfully gotten the keyboard to type characters and whatnot into the display, and started to wonder what I should do with it.

My question is this: has anyone tried to make a UNIX or UNIX-like system using the Propeller? Does anyone have any tips for where exactly to start? Ideally, I'd like to get the Propeller to read a "program" from a source (a.k.a RAM or external memory/SD Card) and execute it, much like a computer does. Any ideas? (Or should I forget it?)

Aaron.

jazzed
07-07-2009, 09:35 AM
Look for posts from Bill Henning

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

RossH
07-07-2009, 09:39 AM
@Aaron,

Various people have written software that can do what you want to do - including PropDos (can load SPIN programs from SD), femtoBasic (can load basic programs from SD) and Catalina (can load C or SPIN programs from SD). I'm sure there are others.

There's even a project to have a true OS (Largos) on the Prop that may one day obviate the need for all these individual program loaders. It looks like being quite "Unix-like".

I'd recommend you have a look at each of these projects before you decide to try anything yourself.

Personally, I don't think Unix itself is ever going to be very feasible on the Prop. There are versions of Unix (e.g. uClinux) for micros that don't have any memory management, but they all seem to require megabytes of physical RAM instead.


Ross.

EDIT: jazzed and I crossed posts - Bill Hennnig's project is the Largos OS I mentioned.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

Perry
07-07-2009, 10:07 AM
@RossH

I have thought about this "Unix" question some too.
most uClinux use a large piece of shared code.
If you go back to "Unix" roots they were small machines.
Some of the other techniques that I think make "Unix"; were hierarchical file system,standard i/o, forks and pipes

I think a "C" based "microkernel" system on the propeller could emulate much of "Unix" functionality

Your work is coming along fabulously.

Perry

Bill Henning
07-07-2009, 10:16 AM
That's pretty much what I am doing with Largos - but I am "modernizing" the roots by making the system be message based.

Bill


Perry said...
@RossH

I have thought about this "Unix" question some too.
most uClinux use a large piece of shared code.
If you go back to "Unix" roots they were small machines.
Some of the other techniques that I think make "Unix"; were hierarchical file system,standard i/o, forks and pipes

I think a "C" based "microkernel" system on the propeller could emulate much of "Unix" functionality

Your work is coming along fabulously.

Perry

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com (http://www.mikronauts.com) - my site my 6.250MHz custom Crystals for running Propellers at 100MHz (http://mikronauts.com/products/mikronauts-625mhz-crystal/)
Las (http://mikronauts.com/products/las-largos-lmm-assembler/) - Large model assembler for the Propeller Largos (http://mikronauts.com/products/largos/) - a feature full nano operating system for the Propeller
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full

RossH
07-07-2009, 10:40 AM
@Perry,

Thanks. However, I doubt that C would be a good choice for implementing a Prop microkernel just yet - at least not until the efficiency of the code generation improves dramatically :)

I think Bill Hennnig's Largos is going to be the way to go. I assume he's implementing directly in PASM (I don't actually know - he may also be using some SPIN, but surely not much).

From what I have seen, Largos looks like being "Unix-like" in approach - but "Unix-like" is still a long way from "Unix". As you pointed out, one of the main things that makes something "Unix-like" is a hierarchical file system see (http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) - but on the Prop we're still struggling with FAT file systems - which are just about the simplest file system ever developed.

Still, people do absolutely amazing things with this little processor, so you never know!

Ross.

EDIT: I see bill and I have also crossed posts!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

Bill Henning
07-07-2009, 11:32 AM
The initial test code is being written as a combination of PASM and Spin, however the "release" Largos is intended to be largely written in LMM - specifically, the kernel, device drivers and system libraries will be in LMM and/or PASM code, however the utilities are likely to be largely in Spin (and later, compiled C code).

Currently, Largos exists as two diverging code paths - a large monolithic shell that is being used to debug the utilities and was used to debug the file system and XMM, and as a separate "system image" that defines the data structures (mailboxes, file control blocks, task control blocks, buffers) and launches a kernel process (currently in Spin, to be migrated to LMM) that processes messages from client cogs. The large monolithic shell will eventually be pared back into just being a shell that launches external programs and executes shell scripts.

As I have time, I will move all the system calls over to the messaging kernel - I have already moved console I/O, the file system is next. Once all the system calls are moved over, I will rip out the individual utilities from the monolithic shell, and store them in /bin.

I am planning to have a preview release of Largos in approximately two to three months, but I will not release it until I think it is ready... and don't forget, I am also doing device drivers for Morpheus, writing documentation, etc. - however I am doing this full time now.

The minimum feature set on release will be:

- device drivers loaded by /etc/modules on startup
- Winbond driver (with a full hierarchical file system - nested directories, some permissions)
- Text console (at leat 80x24, with keyboard support)
- ability to run both Spin .binaries and LMM executables
- a shell with a couple of dozen Unix commands (cat, rm, mv, rmdir, mkdir, touch, cd, pwd and much more)
- shell scripts
- a "Largos.spin" objects so Spin client programs can use OS services

Hopefully, shortly thereafter Sphinx will run on it, and a text editor - at which point it will be a full, stand-alone Propeller development system.

Some time after that, I intend to have a native Largos version of Las, and later, hopefully a native Largos version of Catalina http://forums.parallax.com/images/smilies/smile.gif




RossH said...
@Perry,

Thanks. However, I doubt that C would be a good choice for implementing a Prop microkernel just yet - at least not until the efficiency of the code generation improves dramatically :)

I think Bill Hennnig's Largos is going to be the way to go. I assume he's implementing directly in PASM (I don't actually know - he may also be using some SPIN, but surely not much).

From what I have seen, Largos looks like being "Unix-like" in approach - but "Unix-like" is still a long way from "Unix". As you pointed out, one of the main things that makes something "Unix-like" is a hierarchical file system see (http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) - but on the Prop we're still struggling with FAT file systems - which are just about the simplest file system ever developed.

Still, people do absolutely amazing things with this little processor, so you never know!

Ross.

EDIT: I see bill and I have also crossed posts!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com (http://www.mikronauts.com) - my site my 6.250MHz custom Crystals for running Propellers at 100MHz (http://mikronauts.com/products/mikronauts-625mhz-crystal/)
Las (http://mikronauts.com/products/las-largos-lmm-assembler/) - Large model assembler for the Propeller Largos (http://mikronauts.com/products/largos/) - a feature full nano operating system for the Propeller
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full

Post Edited (Bill Henning) : 7/7/2009 3:40:22 AM GMT