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 MCIMX7ULP-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
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 MCIMX7ULP-EVK hardware platform as an example, the
hello_world
workspace is located in;<install_dir>/boards/evkmcimx7ulp/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 debug probe. Before using it, install SEGGER J-Link software, which can be downloaded from www.segger.com.
Connect the development platform to your PC via USB cable between the USB-UART MICRO USB connector and the PC USB connector, then connect 5 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 Appendix A). Configure the terminal with these settings:
115200 baud rate
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 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
Debug QSPI FLASH XIP Application
Most demo applications use the RAM linker file by default. If users want to use the flash linker file for QSPI XIP debugging, the linker file for QSPI FLASH must be changed from the project default RAM linker file to the FLASH linker file.
Open the hello_world project and select the hello_world top-level project as shown below. Once highlighted, one way to open the options is using ‘Alt-F7’. This opens the option window. Then, select “Linker”. The “Config” tab is shown by default. Enable Override default and enter the location: C:\nxp\SDK_2.3_EVK_MCIMX7ULP\devices\MCIMX7U5\iar\MCIMX7U5xxx08_flash.icf.
|
|
Clean the project once the linker control has been configured. Use the key combo 'Alt-P' to clean. Then, make project using the 'F7' key.
Select the “Use macro files” and the “Use flashloader “ as shown in the following pictures, and start debugging in IAR.
|
|
|
|
Parent topic:Run a demo application using IAR