Run a Demo Using IAR#
The Repository-Layout SDK Package does not ship pre-generated IDE projects. Instead, you generate an IAR Embedded Workbench project on demand from the CMake build, the same way you would from a GitHub Repository SDK checkout.
Prerequisite: Ruby#
IDE project generation is implemented in Ruby and is only needed if you want to use IAR instead of the command line or VS Code. See Ruby - IDE Project Generation (Optional) for setup instructions before continuing.
1. Generate the IAR project#
If this is a pristine build, specify board, example, toolchain and core on the command line:
west build -b evkbmimxrt1170 examples/demo_apps/hello_world --toolchain iar -Dcore_id=cm7 --config flexspi_nor_debug -p always -t guiproject
If you already built the example with west build, you can regenerate the project with
the shorter form:
west build -t guiproject
The project files are generated into mcuxsdk/build/iar, using relative paths to refer
to source files and include paths in the repository. For the full set of guiproject
options, see IDE Project Generation.
Generate into a custom folder#
By default the project is generated into mcuxsdk/build/<toolchain>. To generate into a
different location instead — for example to keep projects for several examples or
boards side by side — pass -d with the pristine build command:
west build -b evkbmimxrt1170 examples/demo_apps/hello_world --toolchain iar -Dcore_id=cm7 --config flexspi_nor_debug -p always -t guiproject -d build_hello_world_iar
2. Open the project in IAR Embedded Workbench#
Open the generated workspace or project file from:
mcuxsdk/build/iar
3. Build the demo application#
Select the desired build target from the drop-down menu, for example hello_world - flexspi_nor_debug.
Click Make to build the demo application.
The build completes without errors.
4. Run the demo application#
Open a terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM port (see How to determine COM port).
Click Download and Debug to flash and start debugging.
Click Go to run to the entry point and resume execution.
The terminal displays the demo application output.
Next steps#
Building Your First Project — build and run from the command line