16-199: Building the Future
Spring 2004

Motorola PowerPC development environment

Project Description
This semester, I worked on setting up a GNU development environment for a Motorola PowerPC embedded processor, the MPC555, as well as developing some basic software for it. This processor, which runs at up to 25MHz and has 480KB of internal flash and 26KB of RAM, is by far the most advanced microcontroller I have seen. In addition to being fully 32 bit and having hardware-level 64 bit floating point capability, it has semi-autonomous function units called TPUs that can handle a variety of I/O tasks with minimal load on the core CPU.

I used an Axiom Manufacturing PB-555 board graciously provided by Prof. Chris Atkeson for my efforts, which required, among other things, writing linker scripts tuned to the memory maps of this board and writing code to interface I/O library code provided by libc with the low-level serial controller built in to the CPU for serial-port communication purposes. I also tried to write programs to interface several peripherals to the 555.
Project State
Work on this project progressed very slowly for several reasons. First, this was one of my first experiences with microcontrollers, and everything I did meant learning something new. Second, transferring programs to the 555 took a very long time because it had to be done using an ASCII-encoded transfer at 9600 bps. Lastly, for much of the semester, I fought with a very frustrating bug that caused many common libc functions (such as malloc and printf) to freeze execution for an undetermined reason.

Despite these difficulties, I managed to configure and compile a cross-compiler for the processor, write the necessary linker scripts and libc I/O interfaces, and demonstrate a number of test programs. Additionally, I have successfully interfaced a magnetic compass using I2C, an optical shaft encoder using the TPU quadrature decode function, and an accelerometer using the CPU's ADC functionality.

Furthermore, thanks mostly to a number of very useful suggestions provided by Garth Zeglin, a researcher working with Prof. Atkeson, I have resolved the libc hangs and can now use every libc function I have cared to try. I also now have a background debugger attachment that allows me to single-step through the execution of a program to locate any future bugs such as the libc bug that had plagued me.

Future Intentions
I am in love with this processor and intend to use it in any future projects that might benefit from its unique features. Specifically, I intend to use it in our mobot in next year's competition. Additionally, I intend to continue work on this over the summer, hopefully offering useful assistance to Garth's project.

Relevant Links

I intend to put up a website describing my efforts in greater detail, including example source code hopefully helpful to anyone trying the same things, once I have a bit more time at the start of summer.