PSAS/ LPC2148Software
  1. Current Work
    1. To Do
  2. Done
  3. Goals
    1. Gadget-side
    2. Host-side
  4. Getting Started
    1. Background
    2. Tools
    3. Code
  5. Current Debates/Choices
  6. Original Capstone Work
  7. Older "Done" list
  8. Links

Current Work

To Do

  1. Replace libusb.
    1. Complete the kernel code that Greg K-H started on to expose direct access to usb endpoints through a character device. Status on this side project can be found here.
    2. Expose the kernel code to user land (thus replacing libusb).
  2. Get more USB cables and power bricks. (Andrew has our two USB to serial adaptors.)
  3. Find a good Linux USB traffic monitor. This one looks promising, but it's a patch against a 2.4.4 kernel. I think Greg K-H also has a USB monitor on his website.
  4. Implement a USB driver for the LPC2148 board. (Long term goal)
    1. Get debugging working on the board. More on those woes here.
    2. Write a simple custom driver using the lpcusb api.


  1. Mirrored my eCos GIT repository on the PSAS server. It can be found at
  2. Attempted to get GDB running under eCos. Unfortunately, it seems that GDB can't run from ROM. I've sent out emails to the eCos list to confirm this, but it looks like we'll have to debug via JTAG.
  3. Found an open source LPC2148 USB stack. It currently supports control, bulk, and interrupt transfers. Note there is no isochronous transfer support or DMA support. It looks to be a sane interface, but I'll do some testing RSN (real soon now).
  4. Got the joystick example from the lpcusb stack working. However, the mass storage device example doesn't work. I suspect it's libusb's fault, since it can't properly write to the device once it opens it.


The LPC2148 chip will be integrated into all the avionics nodes. These nodes will send sensor data across the USB to the flight computer.


Write a USB "gadget" driver for the LPC2148 node. This involves using an open source USB stack, and writing USB drivers for each avionics node.


Write the host-side (flight computer) USB driver. This may involve working on libusb, since it doesn't support isochronous transfers.

Getting Started

For those who want to contribute to this project, here are some first steps to take.



This project requires a laptop (or PC) with Linux installed on it. We will happily dual-boot your computer with Debian Linux. If you already have another flavor of Linux, ask someone in the software team if it's ok.

Also, you'll need to make a cross-compiler toolchain. There is a bash script for Debian attached to the cross-compiler directions.

You'll need tcl-dev (version 8.0 or later; I'm using 8.4), tk8.4-dev, gcc-4.0, g++-4.0, and libwxgtk2.6-dev.


1. Get the Code

2. Build the eCos directory

3. Download lpcusb sources.

Current Debates/Choices

Originally, we debated on which open source USB stack to use. Notes on that debate can be found here.

Original Capstone Work

Link to original eCos port and how to talk to the microcontroller over a serial port.

Older "Done" list

  1. Tried to run the Olimex LPC2148 HID USB example, but it doesn't work. It enumerates (you can see this with lsusb) and it gets listed in /dev/input/mice, but input-events doesn't capture any events. The Olimex demo doesn't come with a makefile, so I can't compile GDB stubs into it and see what's going on over the serial port. I also suspect that there's a file missing from the Olimex sources, since I can't find any initialization of the constant "ENDPINTS" (not my spelling error). The IAR example doesn't have a makefile either.
  2. Ordered two more Olimex boards. Glenn and John Grimm have taken boards. (Glenn subsequently returned the board he had to Andrew. 30-Jul-2007 GNL)


The links page is here.