Run a demo application using IAR
This section describes the steps required to build, run, and debug example applications provided in the MCUXpresso SDK. The hello_world
demo application targeted for the LPCXpresso51U68 hardware platform is used as an example, although these steps can be applied to any example application in the MCUXpresso SDK.
Build an example application
Do the following steps to build the hello_world
example application.
Open the desired demo application workspace. Most example application workspace files can be located using the following path:
<install_dir>/boards/<board_name>/<example_type>/<application_name>/iar
Using the LPCXpresso51U68 hardware platform as an example, the
hello_world
workspace is located in:<install_dir>/boards/lpcxpresso51U68/demo_apps/hello_world/iar/hello_world.eww
Other example applications may have additional folders in their path.
Select the desired build target from the drop-down menu.
For this example, select hello_world – debug.
To build the demo application, click Make, highlighted in red in Figure 2.
The build completes without errors.
Parent topic:Run a demo application using IAR
Run an example application
To download and run the application, perform these steps:
Download and install LPCScrypt or the Windows® operating systems driver for LPCXpresso boards from www.nxp.com/lpcutilities. This installs the required drivers for the board.
Connect the development platform to your PC via USB cable between the Link2 USB connector (named Link for some boards) and the PC USB connector. If you are connecting for the first time, allow about 30 seconds for the devices to enumerate.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM port (to determine the COM port number, see Appendix A). Configure the terminal with these settings:
115200 baud rate (reference BOARD_DEBUG_UART_BAUDRATE variable in board.h file)
No parity
8 data bits
1 stop bit
In IAR, click the “Download and Debug” button to download the application to the target.
The application is then downloaded to the target and automatically runs to the main() function.
Note: The application is programmed to the external on board flash, then jumped to SRAM to run
Run the code by clicking the “Go” button to start the application.
The hello_world application is now running and a banner is displayed on the terminal. If this does not occur, check your terminal settings and connections.
Parent topic:Run a demo application using IAR