Searching \ for '[PIC:] Want to port Linux to PIC16f877...Help need' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Want to port Linux to PIC16f877...Help need'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Want to port Linux to PIC16f877...Help need'
2004\03\31@232612 by Vishal Changrani

picon face
hi to all you big guys ..after reading your questions and answers i feel i m still in nursery :(
anyway heres my question:
I want to develop (or rather 'Port') the linux kernel on to the Pic16f877. Now the reason I wish to do this is:
1. I have to present a research paper due on april 22nd on the topic Real Time operating Systems: Case Study Microcontrollers.
2. I think since both Linux and PIc are so very commercially successful in there respective domains that it would be good idea to combine them in some way.
3. I love linux and the PIC and couldnt think of a better topic.
About the Real time part I think i will save that till later that is after I have finsihing porting Linux to the PIC (if I am able to do it i.e.)

Now i went through a book - Building Embedded Linux Systems ..and it says that it isnt easy (not impossible ) though to port linux on to a 'less than 32 bit' microcontroller or microprocessor. So I am stuck now! since Microchip doesnt offers a 32 bit microcontroller.
Please suggest me something! anything!


Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today

-- hint: To leave the PICList

2004\03\31@233650 by Robert Ussery

Heck, why not jump right into using the 19FXXX series? :O)
A lot easier to port Linux to, I should think...

- Robert

>{Original Message removed}

2004\03\31@233653 by James Caska

Let me get this straight.. You want to port linux to the PIC16F877 and
write a paper on it by the 22nd of april... Whoahh..

I recommend you do your paper - Real Time operating Systems: Case Study
Microcontrollers - on an EXISTING real-time microcontroller O/S. The
muvium Java real-time O/S for the PIC comes to mind ( -
of course ;-)


James Caska
uVM - 'Java Bred for Embedded'

{Original Message removed}

'[PIC:] Want to port Linux to PIC16f877...Help need'
2004\04\01@001354 by Wesley Moore
What the book says is very valid. Even if you could reduce the Linux kernel
to something that would run on a 16F877 it wouldn't really resemble a
Linux kernel anymore. The 16F877 is a comparitively low end microcontroller
and lacks a vast majority of the hardware features to run something
as advanced as Linux.

This isn't an April fools joke by any chance?


On Wed, Mar 31, 2004 at 08:26:16PM -0800, Vishal Changrani wrote:
{Quote hidden}

Wesley Moore - -
Free Email provided by: SDF Public Access UNIX System

-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\01@002029 by Robert L Cochran

I think you are taking on too big a project. To succeed, and get your
paper in by the 22nd, you will need to look at an existing port of a
real time operating system. Porting Linux will be too big a job for you.
Concentrate on presenting a high quality paper on a realistic timeframe.
That's what will get you the good grade and score points.

After you do the paper you can start exploring a Linux port, but this is
a big, tough job.

I'm a Linux person myself. I'm just getting into PIC microcontrollers
and I don't feel like I'm in the nursery at all. I know I'm in the
nursery. One easy step at a time, there is so much to learn...I might
even become as good as some of the others here, after several years...

Bob Cochran

Vishal Changrani wrote:

{Quote hidden}

Bob Cochran
Greenbelt, Maryland, USA

-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\01@002035 by M. Adam Davis

Well, I could easily assume that from where you sent this email it was
April 1st when you sent it, but then I'd have to assume that the entire
world enjoys the American April 1st holiday, which would then expose me
as the sort of ameri-centric snob I've worked so long to hide.

So I'll assume this is a serious request for help and feed the trolls,
er, I mean expose some of the issues you'll run into when you design
Linux into a PIC.

First of all, don't let anyone tell you it can't be done.  Anything is
possible, though there are some tradeoffs:

First, the PIC has no MMU.  Heck, it doesn't really even have a fully
manipulable stack.  Linux typically requires at minimum an MMU, but some
smart folks somewhere on the internet have cobbled together an embedded
MMU-less version of linux.  Find it and learn from them.  Also find out
what kind of life they lead, and expect to live that life for the
remainder of your development period.

Second, the PIC doesn't really have a fully capable ANSI C compiler.
Don't worry, linux won't compile on just any old ANSI compiler anyway.
Go ahead and pull out your copy of C18 and run it on a few linux source
files.  When it runs into a problem, comment that line out.  You can
always sort it out later.  Don't let anyone fool you about linking -
just copy all the object files into one big file (cp *.o linux.obj, for
instance) and let the PIC worry about it.  Then find a PIC with a large
enough code space to hold the entire thing.  Be aware, though, that
since you commented out most of the code in an earlier step, you may
need a larger PIC when you get all that sorted out.

Thirdly, After realizing the futility of compiling linux directly for
the PIC, take up the bright idea of creating an emulator that runs on
the PIC.  You can pick an existing core which already has emulators in C
(such as ARM, MIPS, x86, HAL9000, etc) or make up your own.  Tha
advantage of picking one that exists is you don't have to create the C
compiler as well.  Code up the emulator for the PIC, and create external
address/data busses for flash and ram.  Look up the PCI spec and try to
emulate that bus standard - it'll save you loads of time adding
peripherals later.  The performance of the system may be low (a few
hundred instructions per second of emulated code) but be content in the
fact that you were able to shoehorn Linux into an 8-bit microcontroller.

All it'll take, really, is a bunch of elbow grease and headlamp fluid.
Good luck!  Keep us informed of your progress, ok?


P.S.  While the post is mainly in jest, the third option really would
work.  The PIC, after all, is Turing Complete, and in theory can perform
any logical sequence of steps.  I just can't see the educational value
in doing it...

Vishal Changrani wrote:

{Quote hidden}

-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\01@002304 by Scott Dattalo

On Wed, 31 Mar 2004, Robert Ussery wrote:

> Heck, why not jump right into using the 19FXXX series? :O)
> A lot easier to port Linux to, I should think...


I fully agree. However, since the real silicon for the 19FXXX series won't
be ready for a while I decided to port it to gpsim, the gnupic simulator
( ). I should be done by
tomorrow morning, which is in about 9 hours. (I'll probably have to stay
up all night working on it since I don't have the 19Fxxx data sheet yet,
but I got a pretty good idea how it's supposed to work).


> - Robert
> >{Original Message removed}

2004\04\01@010839 by Wouter van Ooijen

face picon face
> Thirdly, After realizing the futility of compiling linux directly for
> the PIC, take up the bright idea of creating an emulator that runs on
> the PIC.

When you go that lane consider using a Ubicom SX. You might even get a
system preformance that approaches a PDP-7 :)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica:
consultancy, development, PICmicro products

-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\01@013356 by Bertrand Rozier


Did you talkabout the 18FXXXX series? or 19FXXX ?

-----Message d'origine-----
De : pic microcontroller discussion list
[EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU]De la part de Robert Ussery
Envoyé : jeudi 1 avril 2004 06:34
Objet : Re: [PIC:] Want to port Linux to PIC16f877...Help needed from
all you big guys

Heck, why not jump right into using the 19FXXX series? :O)
A lot easier to port Linux to, I should think...

- Robert

>{Original Message removed}

2004\04\01@045906 by Xavier MONTAGNE

I agree with Adam : the best is to try to port ucLinux (the NO_MMU and NO_FPU version of Linux) to a PIC18 target (the only one to let you manage the hardware stack). Anyway don't forget the RAM space dedicated to the task descriptor is something like 2Kbytes with ucLinux, so you need a PIC with a lot of RAM space available to do it ! But if you have free time enough (one year probably) and a solution to have a PIC with many Kbytes free in the RAM space you can try to start the job....
Let us know when you get a first result.

{Quote hidden}

-- hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...