Run a demo using Keil MDK/μVision

This section describes the steps required to build, run, and debug example applications provided in the MCUXpresso SDK.

The hello_world demo application is used as an example, although these steps can be applied to any demo or example application in the MCUXpresso SDK.

Note:

Make sure that the board is configured as XSPI0 boot mode when debugging or running the examples.

Install CMSIS device pack

After the MDK tools are installed, Cortex Microcontroller Software Interface Standard (CMSIS) device packs must be installed to fully support the device from a debug perspective. These packs include things such as memory map information, register definitions and flash programming algorithms. Follow these steps to install the appropriate CMSIS pack.

  1. Open the MDK IDE, which is called μVision. In the IDE, select the Pack Installer icon.

  2. After the installation finishes, close the Pack Installer window and return to the μVision IDE.

Parent topic:Run a demo using Keil MDK/μVision

Build an example application

To build an example application, perform the following steps:

  1. Open the desired example application workspace in:

    <install_dir>/boards/<board_name>/<example_type>/<application_name>/<core_id>/mdk The workspace file is named as <demo_name>.uvmpw.

    For this specific example, the actual path is:

    <install_dir>/boards/mimxrt700evk/demo_apps/hello_world/cm33_core0/mdk/hello_world_demo_cm33_core0.uvmpw

  2. To build the demo project, select Rebuild, as shown in Figure 1, highlighted in red.

  3. The build completes without errors.

Parent topic:Run a demo using Keil MDK/μVision

Run an example application

To download and run the application, perform these steps:

  1. 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 operating system, this step is not required.

    • If using J-Link either a standalone debug pod or MCU-LINK, install the J-Link software (drivers and utilities) from Segger.

  2. Connect the development platform to your PC via USB cable using MCU-LINK USB connector.

  3. Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug serial port number (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 the BOARD_DEBUG_UART_BAUDRATE variable in the board.h file)

    • No parity

    • 8 data bits

    • 1 stop bit

  4. In μVision, after the application is built, click the Download button to download the application to the target.

  5. After clicking the Download button, the application downloads to the target and is running. To debug the application, click the Start/Stop Debug Session button, highlighted in red in Figure 3.

  6. Run the code by clicking the Run button to start the application.

The hello_world application is now running and a banner is displayed on the terminal. If this does not appear, check your terminal settings and connections.

Parent topic:Run a demo using Keil MDK/μVision

Build a multicore example application

This section describes the particular steps that need to be done in order to build and run a multicore application.

The multicore Hello World MDK workspaces are located in this folder:

<install_dir>/boards/mimxrt700evk/multicore_examples/hello_world/cm33_core0/mdk/hello_world_cm33_core0.uvmpw

<install_dir>/boards/ mimxrt700evk /multicore_examples/hello_world/cm33_core1/mdk/hello_world_cm33_core1.uvmpw

To build both applications separately, click the Rebuild button. Build the application for the auxiliary core (cm33_core1) first, because the primary core application project (cm33_core0) must know the auxiliary core application binary when running the linker. It is not possible to finish the primary core linker when the auxiliary core application binary is not ready.

Parent topic:Run a demo using Keil MDK/μVision

Run a multicore example application

This section describes the steps to run a multicore example application. The primary core debugger flashes both the primary and the auxiliary core applications into the SoC flash memory.

  1. To download and run the multicore application, switch to the primary core application project and perform Step 1Step 3, as described in Run an example application.

  2. Run the primary core project and then run the secondary core project.

  3. Hello_World multicore demos are now running. A banner appears on the terminal and the LED blinks. If this is not true, check your terminal settings and connections.

Parent topic:Run a demo using Keil MDK/μVision