I finally got around to playing with the free LPCXpresso boards I was sent by NXP. A nifty little ARM Cortex M0 board with an USB programming and console link, gcc based compiler and Eclipse based IDE. The CPU is a LPC1114 and features:
- 32-bit ARM Cortex M0 core
- 32kB FLASH
- 8kB SRAM
- 1x UART
- 1x I2C interface
- 2x SPI interface
- 8x ADC channels
- SWD debugging interface
- Multiple counters
The full specifications and the board are available from Embedded Artists.
The only downside to the development environment is that it does not support OS X – only Windows and Linux. Typical. However I’ve played around today and after a bit of messing around I got it working under VirtualBox 4.0.6 and Ubuntu under OS X 10.6.7.
It’s pretty straight forward, however there’s a small trick you need to do to VirtualBox to make the debugging run properly. The USB debugger interface to the LPCXpresso board is initialised/programmed by the IDE the first time it run. So when you plug it into your Mac, VirtualBox reports it as “Unknown device” under the “Devices -> USB Devices” menu. After the device is configured for debugging VirtualBox reports it as “Code Red Technologies LPC-Link Probe v1.1”.
VirtualBox needs to be configured to automatically connect both devices, especially after it has change from one to the other otherwise the debugger software in the IDE will time out since it won’t be able to find the “Code Red” device once it changes because it won’t be connected through to Ubuntu client. Luckily it is fairly simple to configure VirtualBox to fix the problem, the steps I took follow.
Steps to fix the problem, assuming you have installed and activated the Code Red IDE for LPCXpresso:
- Unplug and reconnect the LCPXpresso board to make sure it is reset.
- Run up VirtualBox but don’t start the linux client.
- Go into the Settings-> Ports-> USB section for your linux client.
- Add a new USB device (the symbol with the + sign at the right), select “Unknown Device” and then click OK.
- Launch the linux client in VirtualBox.
- Open a terminal in the linux client, type the following:
cd /usr/local/LPCXpresso/bin
- Enter the following to load the configuration code into the LPCXpresso board:
dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
- Look in the VirtualBox “Devices -> USB Devices” menu, “Unknown Device” will be gone, replaced by “Code Red Technologies LPC-Link” device.
- Leave the LPCXpresso board connected and shutdown the linux client
- Once the linux client is shutdown, go back into the VirtualBox Settings-> Ports-> USB section for your linux client
- Add a new USB device (the symbol with the + sign), select the “Code Red Technologies LPC-Link” device
- For good measure, move the “Code Red Technologies LPC-Link” device to the top of the list, by selecting it then clicking on the symbol at the side with the up arrow, then click OK
And that’s it. Now when you use the IDE you will no longer have to manually select the USB device to start nor when it changes during operation. I’ve tested this with the blinky example and with the console print example, the LPC-Link debugger worked fine each time, prior to setting up the USB filters in VirtualBox I found that debugging from the IDE was woeful and hardly reliable.
Yup, that worked just fine! Thank you Tom!