I agree with Adam : the best is to try to port ucLinux (the NO_MMU and NO_F= PU version of Linux) to a PIC18 target (the only one to let you manage the = hardware stack).=20 Anyway don't forget the RAM space dedicated to the task descriptor is somet= hing like 2Kbytes with ucLinux, so you need a PIC with a lot of RAM space a= vailable to do it ! But if you have free time enough (one year probably) an= d a solution to have a PIC with many Kbytes free in the RAM space you can t= ry to start the job.... Let us know when you get a first result. Xavier > Message du 01/04/04 07:20 > De : M. Adam Davis=20 > A : PICLIST@MITVMA.MIT.EDU > Copie =E0 :=20 > Objet : Re: [PIC:] Want to port Linux to PIC16f877...Help needed from all= you big guys > 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. >=20 > 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. >=20 > First of all, don't let anyone tell you it can't be done. Anything is > possible, though there are some tradeoffs: >=20 > 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. >=20 > 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. >=20 > 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. >=20 > All it'll take, really, is a bunch of elbow grease and headlamp fluid. > Good luck! Keep us informed of your progress, ok? >=20 > -Adam >=20 > 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... >=20 > Vishal Changrani wrote: >=20 > >hi, > >hi to all you big guys there..man ..after reading your questions and ans= wers i feel i m still in nursery :( > >anyway heres my question: > >I want to develop (or rather 'Port') the linux kernel on to the Pic16f87= 7. Now the reason I wish to do this is: > >1. I have to present a research paper due on april 22nd on the topic Rea= l 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 s= ome 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 aft= er 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 say= s that it isnt easy (not impossible ) though to port linux on to a 'less th= an 32 bit' microcontroller or microprocessor. So I am stuck now! since Micr= ochip doesnt offers a 32 bit microcontroller. > >Please suggest me something! anything! > > > >Thankyou > >Bye > >Vishal > > > > > >--------------------------------- > >Do you Yahoo!? > >Yahoo! Small Business $15K Web Design Giveaway - Enter today > > > >-- > >http://www.piclist.com hint: To leave the PICList > >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > >=20 > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads