During Embedded World 2017 in Nürnberg I was lucky to get a handful LPC800-DIP boards. To get all students who were lucky to get one, here is a tutorial to make that very exciting ‘blinky’ application on that board:
MCUXpresso IDE Series
This article is part of a series to get up to speed using the new NXP MCUXpresso IDE. Published so far are:
- MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers
- MCUXpresso IDE: S-Record, Intel Hex and Binary Files
- MCUXpresso IDE: Adding the Eclipse Marketplace Client
- MCUXpresso IDE: Importing Kinetis Design Studio Projects
- MCUXpresso IDE: Installing Processor Expert into Eclipse Neon
- MCUXpresso IDE: Terminate and Disconnect a Debug Session
- MCUXpresso IDE: Blinky the NXP LPC800-DIP Board
Outline
This article shows to run a first ‘blinky’ (toggling LEDs on the board) on the LPC800-DIP board using Eclipse (MCUXpresso IDE) and the NXP LPCOpen library.
You need
- LPC800-DIP board or any other LPC8xx board, in that case you will need to change the LED pins in the source code
- MCUXpresso IDE V10.0.0 b344
- Micro USB cable
- SWD/JTAG debug probe like the LPC-Link2
he LPC800-DIP board does not contain a debug interface, but the USB-2-UART bridge which can be used with the FlashMagic (by Embedded Systems Academy) tool to program binaries. As I want to debug my application, I’m not using this tool in this article.
A link to all the project and source files is provided at the end of the article
LPC800-DIP Board
The LPC800-DIP board is a tiny board with the NXP LPC824 microcontroller on it:
It has the LPC824M201JHI33 on it (32 bit Cortex-M0+, 32 KByte Flash, 4 KB RAM) in breadboard friendly pin out. The microcontroller can be programmed using SWD or through the Silabs CP2102 UART-USB bridge: with pressing the ISP button I can program the device through the USB connection to the host and the FlashMagic utility.
SDK: LPC Board and LPC Chip Projects
To start with the board, I need a software library or SDK. For the LPC800 NXP provides the LPCOpen library. That library already is installed with the MCUXpresso IDE:
Alternatively, I can find them here: http://www.nxp.com/products/software-and-tools/software-development-tools/software-tools/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc8xx:LPCOPEN-SOFTWARE-FOR-LPC8XX
I import the library project into my workspace using the ‘Import project(s) from file system…’ from the Quickstart panel in the MCUXpresso IDE:
Then browse for the LPCOpen archive file:
Press Next. I get offered a selection of projects to import. I need the chip library which I select:
The ‘chip’ library as the name indicates supports the given chip. I could as well import the board library (but that one would be for that board) or the example projects. For my blinky project all what I need is the chip library and I will do my ‘board support’ for the LEDs.
Press Finish, and the chip library shows up in the workspace:
Creating Project
The next step is to create a new project for the board. I use again the Quickstart panel with ‘New Project’:
Select the LPC824:
Press next. Select LPCOpen C project:
Press Next and give a project name:
In the next dialog it should detect the chip library I have present in my workspace:
Press Next. In the next dialogs I use the defaults until I get to the point to finish the wizard and the project gets created in the workspace:
Read more: MCUXpresso IDE: Blinky the NXP LPC800-DIP Board