Need Sample MPC860 Code

Hi, i am working with an Embedded Planet RPX MPC860 board and am totally new to embedded programming. All i want to do is verify the steps to compile some code and put it into the flash memory. I can follow the steps to make the flash image but i need some sample code to put in. If some one could just point me to the right direction where i can find any small peice of code that can run in the MPC860 i would greatly apretiate it. Anything will suffice, maybe somthing small like a counter or somthing that toggles a register in the MPC860.

I am just really new at this and am having a hard time finding the proper libraries for c so i don't really know what sort of functions calls are at my disposal. Anything to get me started will be nice.

Please help!! Thanks in advance.

Fahd A

Reply to
Fahd
Loading thread data ...

There is sample code for the MBX860 - a MPC860 based board from the Motorola Computer Group available at:

formatting link
formatting link

Download the 'Omega Environment OmegaBSP Distribution' and disregard the references to the Omega RTOS - should serve as a good example.

Dave.

--
David J Edgar
Cedaryacht Limited
 Click to see the full signature
Reply to
David J Edgar

Hi, Thanks for the link, i already saw that one, unfortunatlly the source code in there is not targetted for the MPC860, it is ABLE-HDL targeting a PAL. I was looking for some simple source code running inside the MPC860.

I am wondering, if i wrote a simple Hello World program using stdio as the library but targeted it to the MPC860, exactlly what would the printf statement write out to? Maybe i can substitute the printf for another function that would write out to the serial port so i can monitor it? I think i also need to make sure that the MPC860 is already running a linux kernel. As you can tell i am a total noob.

#include int main(void) { printf("Hello World !\n"); // Maybe substitute this with another function? return(0); }

Thank you for your help.

Fahd

Reply to
Fahd

You might want to check out books on programming embedded systems. There are plenty out there. "Programming Embedded Systems in C and C++" from O'Reilly seems ok. It takes someone who is used to coding on desktop/workstation computers and explains how things are different in the embedded world.

Reply to
Gary Kato

...

Download the U-Boot source code, study it, configure it for the RPX board (which is supported as one of the many default configurations), install it into flash, run it, check the example programs in the examples/ directory, etc.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
 Click to see the full signature
Reply to
Wolfgang Denk

Thanks Denk, I will try and do a search for the U-Boot source. Does Denx have this on their website? By the way i was already using the ELDK 2.1.0 from denx to do the cross compilations. Thanks for all your help guys, i might also pickup the programming book.

Oh, and i came across this place montavistasoftware.com, they offer a linux distribution for the RPXlite board from EP, i have an app note that describes debugging the kernel with a BDI2000 using GDB, exactlly what i was looking for.

Thanks,

Fahd

Reply to
Fahd

google should point you directly to project page at

formatting link

Yes, we have all officialy released version on out FTP server at ftp://ftp.denx.de/pub/u-boot/

If you have the ELDK installed, just look in /opt/eldk/ppc_8xx/usr/src/u-boot*

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
 Click to see the full signature
Reply to
Wolfgang Denk

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.