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 LPCXpresso54018 hardware platform is used as an example, although these steps can be applied to any example application in the MCUXpresso SDK.
Before downloading and running 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 or 9600 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE variable in board.h file)
No parity
8 data bits
1 stop bit
Build an non-XIP (plain load) 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 LPCXpresso54018 hardware platform as an example, the
hello_world
workspace is located in:<install_dir>/boards/lpcxpresso54018/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 a non-XIP (plain load) example application using CMSIS DAP
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
Run a non-XIP (plain load) example application using J-Link/J-Trace
This section describes how to configure EWARM if using a J-link/J-Trace debug probe, or a probe which has been programmed with J-link firmware.
Select “J-Link/J-Trace” and “Use macro file(s)”.
Unselect “Use flash loader(s)” to use SEGGER J-Link flashloaders. Then, click the “OK” button.
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.
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 is not true, check your terminal settings and connections.
Parent topic:Run a demo application using IAR
Build an XIP example application
The following steps guide you through opening the hello_world_qspi_xip example application. These steps may change slightly for other example applications, as some of these applications may have additional layers of folders in their paths.
If not already done, 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 LPCXpresso54018 hardware platform as an example, the hello_world workspace is located in
<install_dir>/boards/lpcxpresso54018/demo_apps/hello_world/iar/hello_world_qspi_xip.eww
Select the desired build target from the drop-down. For this example, select the “hello_world_qspi_xip – Debug” target.
Select “Reset and halt after bootloader”, highlighted in red below.
To build the demo application, click the “Make” button, highlighted in red below.
Parent topic:Run a demo application using IAR
Run an XIP example application
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.
Run the code by clicking the “Go” button to start the application.
The hello_world_qspi_xip application is now running and a banner is displayed on the terminal. If this is not true, check your terminal settings and connections.
Parent topic:Run a demo application using IAR