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 i.MX 8MN EVK 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
Before using IAR, get the IAR patch, iar_support_patch_imx8mn.zip. Install the i.MX8MN support patch following the guides in readme.txt
located in the archive.
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 i.MX 8MN EVK hardware platform as an example, the
hello_world
workspace is located in:<install_dir>/boards/evkmimx8mn/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:
This board supports the J-Link PLUS debug probe. Before using it, install SEGGER J-Link software, which can be downloaded from http://www.segger.com/downloads/jlink/.
Connect the development platform to your PC via USB cable between the USB-UART MICRO USB connector and the PC USB connector, then connect 12 V power supply and J-Link Plus to the device.
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 baud rate
No parity
8 data bits
1 stop bit
|
|
In IAR, click Download and Debug to download the application to the target.
|
|
The application then downloads to the target and automatically runs to the
main()
function.|
|
Run the code by clicking Go 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.|
|
**Note:** For downloading the DDR target application, insert one TF card with U-Boot code. This requires both on IAR and GCC.
Parent topic:Run a demo application using IAR