Run a demo application using IAR
This section describes the steps required to build, run, and debug example applications provided in the MCUXpresso SDK.
Note: IAR Embedded Workbench for Arm version 9.10.2 is used in the following example, and the IAR toolchain should correspond to the latest supported version, as described in the MCUXpresso SDK Release Notes.
Build an example application
Perform 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 FRDM-KE17Z Freedom hardware platform as an example, the
hello_world
workspace is located in:<install_dir>/boards/frdmke17z/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:
See Table 1 to determine the debug interface that comes loaded on your specific hardware platform.
For boards with the CMSIS-DAP/mbed/DAPLink interface, visit Windows serial configuration and follow the instructions to install the Windows operating system serial driver. If running on Linux OS, this step is not required.
For boards with a P&E Micro interface, visit PE micro and download and install the P&E Micro Hardware Interface Drivers package.
If using J-Link either a standalone debug pod or OpenSDA, install the J-Link software (drivers and utilities) from Segger.
Connect the development platform to your PC via USB cable.
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 How to determine COM port). Configure the terminal with these settings:
115200 or 9600 baud rate, depending on your board (reference
BOARD_DEBUG_UART_BAUDRATE
variable in theboard.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.|
|
Run the code by clicking the Go button.
|
|
The
hello_world
application is now running and a banner is displayed on the terminal. If it does not appear, check your terminal settings and connections.|
|
Parent topic:Run a demo application using IAR