![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
The procedure here explains how to import projects for a support LPCOpen platform, configure the projects, build and deploy the projects, and then debug them.
The example below shows the steps for the LCP1347 device on the Xpresso LPC1347 board, but the same procedure applies to all platforms.
Opening the project workspace
Multiple examples are organized into Workspaces for EWARM. To select a project group, double-click the appropriate workspaces file in the iar_ewarm_projects directory for the chip you want to use. Once a workspace file is started, all the examples associated with that workspace will be shown in the workspace view.
For example, if you want to build examples for the Xpresso LPC1347 platform, you'll need to go to the "lpcopen/applications/lpc13xx/iar_ewarm_projects" directory and then select one of the multi-project files there.
Selecting and building the board library for the examples
All examples depend on a board library. Before building an actual example, this library needs to be built. At the bottom of the workspace view, select the lib_lpc_boards_13xx project. At the top of the workspace view, select the select the board the library should be built for (ie, nxp_xpresso_1347).
Then select "Make" from the project menu to build the library. This only needs to be performed once unless the code related to the board files has been changed.
The image below shows the nxp_xpresso_1347 board selected.
Selecting and building other libraries
Some examples require other libraries to be built prior to using them. For example, the USBLIB examples require the appropriate USB libraries to be built before the examples can be built. These libraries are built using the same approach as the board library - select the lib_lpcusblib_chip project (where chip is the device family you are using) at the bottom of the workspace view, select the "platform/chip/interface" the library should be built for, and then selecting "Build" from the project menu.
The image below shows the LPC1347 USBLIB device library selected.
Changing default optimization level
All library and application projects for IAR are configured to build at full optimization. This setting is (High). Using this level of optimization typically makes the code harder to debug, but has smaller code size and better performance. You can change the optimization settings by opening the project options by right-clicking on the project in the workspace view and selecting Options. Then select the C/C++ category and the optimization tab and select the optimization level you want for your build images. Using an optimization level of (None) will give a better debug experience, but a larger image.
Selecting and building an example
To select an example to build, select the example in the list on the bottom of the workspace view. After the example is selected, select the board the example should be built for from the dropdown box at the top of the workspace view. Then select "Make" from the project menu to build the example.
The image below shows the periph_blinky example selected with the Xpresso LPC1347 board (iflash_nxp_xpresso_1347) selected as the build target.
Programming the example into the board
To program the example into the board, select "Download and Debug" from the Project menu. The image will be programmed into the board (and the debug session will start).
Debugging the example
The debug session should of started from the previous step. You can use the step, run, stop, and breakpoints selections on the debug menu to control run operation.