PDA

View Full Version : uclinux for Propeller



m4c13k
07-05-2009, 04:12 PM
Hello,

I'm new on the Propeller uC and have a question regarding a port of uclinux for this one.
I read that ImageCraft brought out the ICCv7 C-compiler and want to know if someone have tried to port this OS for the propeller uC or if someone know a projekt regarded to this.

Thank you very much in advance.
Mace

Leon
07-05-2009, 04:20 PM
Check the requirements for uClinux!

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Loopy Byteloose
07-05-2009, 04:25 PM
Generally, Linux requires a complete file system in order to use. The Propeller is just beginning to support a file system. So if you can figure out how to make the two ends meet, it will work.

I do suspect that a Linux system would use at least two Propellers. One for video, keyboard, and mouse and another for the managing memory for the Linux kernel, etc.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?

aka G. Herzog [ 黃鶴 ] in Taiwan

BradC
07-05-2009, 04:44 PM
Loopy Byteloose said...
Generally, Linux requires a complete file system in order to use.


The biggest limitation is linux relies on a lot of "extensions" provided by GCC that are unlikely to be supported by either of the LCC based C compilers.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Missed it by ->" "<- that much!

m4c13k
07-05-2009, 04:52 PM
Somebody said...
Generally, Linux requires a complete file system in order to use. The Propeller is just beginning to support a file system. So if you can figure out how to make the two ends meet, it will work.

I do suspect that a Linux system would use at least two Propellers. One for video, keyboard, and mouse and another for the managing memory for the Linux kernel, etc.


Hm, can't a Flash drive (SD/MMC) be used for holding the Linux kernel and file system as a compessed file (ex. *tar.bz2)? To start linux a bootloader can be written in spin or assembler. Because Linux can't be run directly in flash, the bottloader can unpack the kernel and the file system into a ram with enough memory. This way is used in many solution for other uC's with not enought ram space.


BradC said...

Loopy Byteloose said...
Generally, Linux requires a complete file system in order to use.


The biggest limitation is linux relies on a lot of "extensions" provided by GCC that are unlikely to be supported by either of the LCC based C compilers.


I understand, in the moment there is no GCC based compiler for the Propeller. I don't know much about LCC, but can't it use GCC libs?

Loopy Byteloose
07-05-2009, 05:00 PM
Someone, maybe yourself, is going to have to perfect the appropriate C compiler in order to load Linux. In other words, Linux is C dependent and any microprocessor that commits to Linux has to have an appropriate C compiler developed in order to do so.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?

aka G. Herzog [ 黃鶴 ] in Taiwan

RossH
07-05-2009, 05:02 PM
@all,

You would probably be better off looking at Largos - see http://mikronauts.com/products/largos/

LCC does not use gcc libraries. LCC does not use any libraries - LCC is just a compiler, and does not supply a library.

Also, the gcc libraries are hugely memory hungry, being intended for much larger systems.

There are smaller libraries intended for embedded systems, such as newlib and uClibC - but even those are probably way too large for the Propeller.

Ross.

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

BradC
07-05-2009, 05:14 PM
m4c13k said...

I understand, in the moment there is no GCC based compiler for the Propeller. I don't know much about LCC, but can't it use GCC libs?


GCC when compiling the kernel does not use GCC libs. Have you ever looked at the kernel build process in more than a cursory fashion?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Missed it by ->" "<- that much!

Loopy Byteloose
07-06-2009, 12:26 AM
@RossH
The size of the memory demands are not an issue when cross-comiling the Linux on a Windows machine for a Linux Kernel on another machine. It may actually be helpful. But somebody does have to figure out a hardware configuration for the Propeller including how many Propellers and how much of what kind of RAM just to get started.

C on a Propeller is a whole different design issue.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?

aka G. Herzog [ 黃鶴 ] in Taiwan

Ale
07-06-2009, 12:44 AM
I remember somewhere around 2000 I ported uClinux to a H8/300H derivative. The compiled kernel (2.0.38) was around 700 kbytes. Of course gcc was ported to that processor but the port was not finished. And the kernel is just one step. To do something you need a libc that also needs porting. I do not say It can't be done. you need several building blocks before: binutils, gcc, kernel and ulibc. And do not forget a model that support some 2 or more MBytes. The LMM implementation of Bill I think can be used but I do not think it will be especially fast. Do not forget that branches are just emulated, constant loading too, stack operations are also emulated just to name a few.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit the home of pPropQL: propeller.wikispaces.com/pPropQL (http://propeller.wikispaces.com/pPropQL)
pPropQL020: propeller.wikispaces.com/pPropQL (http://propeller.wikispaces.com/pPropQL)
OMU for the pPropQL/020 propeller.wikispaces.com/OMU (http://propeller.wikispaces.com/OMU)

Bill Henning
07-06-2009, 01:07 AM
I think its possible to port uClinux, but it is still (reliatively speaking) a resource hog (as you said).

My LMM/XMM combo could run it at (I'm guessing) 1-2MIPS, and I can sell 7.5MB Morpheus systems right now - however Largos will outrun it speed wise when it is ready, and run in a lot less memory. I can actually support 15.5MB of ram once I build a surface mounted 8MB board.

Even though it would cause more Morhpheus and Mem+ sales I am not sure it is worth the effort.


Ale said...
I remember somewhere around 2000 I ported uClinux to a H8/300H derivative. The compiled kernel (2.0.38) was around 700 kbytes. Of course gcc was ported to that processor but the port was not finished. And the kernel is just one step. To do something you need a libc that also needs porting. I do not say It can't be done. you need several building blocks before: binutils, gcc, kernel and ulibc. And do not forget a model that support some 2 or more MBytes. The LMM implementation of Bill I think can be used but I do not think it will be especially fast. Do not forget that branches are just emulated, constant loading too, stack operations are also emulated just to name a few.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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

trev
07-06-2009, 02:38 AM
http://www.freertos.org/ PICxx, 8051 etc 3 'C' files so should be easy to port.

A micro kernel like this is I think is the better way forward , starting with just a scheduler you can build on top of it as required e.g. I/O handling, virtual addressing ( extended memory models ). Adding SMP or other multi process scheduling ... that will require a bit of ingenuity.

Bill Henning
07-06-2009, 03:42 AM
It basically just a scheduler that provides IPC - it is not a real operating system. You need to cross develop, and your application compiles the kernel in - no shell, no multiple apps at once, one binary image. Its cute though for AVR's and PIC's.


trev said...
http://www.freertos.org/ PICxx, 8051 etc 3 'C' files so should be easy to port.

A micro kernel like this is I think is the better way forward , starting with just a scheduler you can build on top of it as required e.g. I/O handling, virtual addressing ( extended memory models ). Adding SMP or other multi process scheduling ... that will require a bit of ingenuity.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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

waltc
07-06-2009, 05:00 AM
It might be possible to port a very limited version uclinux, provided you can get some of the C gurus here to support such a project with a lot of their time, but I doubt its worth the effort that will be put into it.

Personally I think the work some of the folks here are doing with PropDos and the like is more useful.

Nick Mueller
07-06-2009, 05:21 AM
I think, the Prop is simply the wrong platform for an real OS.
The Prop really shines with his 8 COGs when you use them (all, or almost all) for doing parallel tasks. A simple OS (by terms of non-multi-core -OS) is the wrong thing for it. And a real multi-core-OS would be by far too big.
The Prop simply doesn't have enough RAM for that.
Write your own dedicated "OS" if you need to. But feed the COGs with work.

I *personally* think, that the efforts made here for writing OSes for the prop arent very helpful. That doesn't mean that I think they are a nonsense. Interesting task, absolutely! But *I* wouldn't do that.

OTOH, if you do really massively interconnect Props (say at least 50 or so) *that* would be a thing.
Think Transputers! Did someone actually implement a real OS on them? Think I'll have to dig out the books about them ...
(Just googled for "transputer" and found the most stupid explanation for the word: "It is an artificial word built out of 'transistor' and 'computer'. THAT HURTS!)

Nick

Nick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO (http://www.yadro.de)

waltc
07-06-2009, 06:31 AM
Think Transputers! Did someone actually implement a real OS on them? Think I'll have to dig out the books about them ...

The OS was named Helios from Perhelion IMS.

heater
07-06-2009, 06:55 AM
Nick Mueller: No, that is not what "transputer" is about.

Way back in time "transput" was a term used to refer to input and output facilities. So for example check the "transput" of the ALGOL 68 language here: en.wikipedia.org/wiki/ALGOL_68#transput:_Input_and_output (http://en.wikipedia.org/wiki/ALGOL_68#transput:_Input_and_output)

Now, the whole design of the Transputer was based on the idea of CSP (Communicating Sequential Processes) en.wikipedia.org/wiki/Communicating_sequential_processes (http://en.wikipedia.org/wiki/Communicating_sequential_processes)

Hence it came with those hardware communication channels. Hence the name "Transputer".

And yes, there was Helios. But like the Propeller the Transputer did not need any OS to be damn useful.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

m4c13k
07-07-2009, 03:32 AM
Ok Guys, thank you for the answeres, they were very helpfull. I will look what i can do with freeRTOS or if I have the time to write an OS for the Prop.

@RossH: can you give me some tips, how I can get Largos?

Nick Mueller
07-07-2009, 03:33 AM
> Hence it came with those hardware communication channels. Hence the name "Transputer".

That's why I wrote "That hurts" all in capitals. http://forums.parallax.com/images/smilies/smile.gif


Nick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO (http://www.yadro.de)

Leon
07-07-2009, 03:42 AM
The name "transputer" was definitely coined by Ian Barron from "transistor" and "computer". It was nothing to do with any earlier use of the word "transput". It was never capitalised, as it was intended to be a ubiquitous device like the transistor.

When I was developing transputer-based systems I knew the people at Perihelion and they gave me a copy of Helios (it was full of bugs). It was eventually used as the OS for a transputer array interfaced to an Atari ST, IIRC.

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Post Edited (Leon) : 7/6/2009 8:48:59 PM GMT

heater
07-07-2009, 04:09 AM
Leon: OK. I like my explanation better though:)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

Nick Mueller
07-07-2009, 04:14 AM
> The name "transputer" was definitely coined by Ian Barron from "transistor" and "computer".

OK, then I take that for granted!


Nick
PS:
I always have to look at your avatar. Nice cat!
I do have two. A siamese (chocolate point) and an oriental short-hair (that's how they are called here) (lilac). The siamese is sleeping on the laboratory power-supply right now. http://forums.parallax.com/images/smilies/smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO (http://www.yadro.de)

Leon
07-07-2009, 06:41 AM
He's a lilac Burmese called Babbage. He was a kitten in the avatar photo.

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Bill Henning
07-07-2009, 09:22 AM
first, you wait a couple of months... sorry, it is no where near ready for public consumption yet. I'll be posting updates in the forums and on my site as things develop.


m4c13k said...
Ok Guys, thank you for the answeres, they were very helpfull. I will look what i can do with freeRTOS or if I have the time to write an OS for the Prop.

@RossH: can you give me some tips, how I can get Largos?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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

jazzed
07-07-2009, 09:33 AM
Nick Mueller said...
...
I do have two. A siamese (chocolate point) and an oriental short-hair (that's how they are called here) (lilac). The siamese is sleeping on the laboratory power-supply right now. http://forums.parallax.com/images/smilies/smile.gif

That kind of describes my ... err, someone I know very well ... :) She stays out of the lab though.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--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)

Post Edited (jazzed) : 7/7/2009 2:38:25 AM GMT