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.

Both CMSIS-DAP and J-Link debugging interfaces are supported for Keil IDE. It is recommended to set SW5[1..4] to 0001 for both debugging interfaces. It is required to reset board for each download/debug.

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 MIMXRT118x CMSIS pack.

  1. Download the MIMXRT1181, MIMXRT1182, MIMXRT1187, and MIMXRT1189 packs.

  2. After downloading the DFP, double click to install it. Be patient when the DFP is installed. It will take approximate 15 minutes for the installation to complete.

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

Build an example application

  1. Open the desired example application workspace in:

    <install_dir>/boards/<board_name>/<example_type>/<application_name>/mdk

    The workspace file is named as <demo_name>.uvmpw. For this specific example, the actual path is:

    <install_dir>/boards/evkmimxrt1180/demo_apps/hello_world/cm33/mdk/hello_world_demo_cm33.uvmpw

  2. To build the demo project, select Rebuild, highlighted in red.

  3. The build completes without errors.

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

Run an example application

The default MDK project settings assumes CMSIS-DAP debug interface is used. If you are using a CMSIS-DAP debugging interface, perform the following steps:

  1. Connect the development platform to your PC via USB cable.

  2. 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:

    1. 115200 or 9600 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATEvariable in the board.hfile)

    2. No parity

    3. 8 data bits

    4. 1 stop bit

  3. To debug the application, click the Start/Stop Debug Session button or Ctrl + F5, highlighted in Figure 2.

  4. Run the code by clicking Run to start the application, as shown in Figure 3.

    The hello_world application is now running and a banner is displayed on the terminal, as shown in Figure 4. If this is not true, 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 dual-core application. The demo applications workspace files are located in this folder:

<install_dir>/boards/evkmimxrt1180/multicore_examples/<application_name>/<core_type>/mdk

Begin with a simple dual-core version of the Hello World application. The multicore Hello World MDK workspaces are located in this folder:

<install_dir>/boards/evkmimxrt1180/multicore_examples/hello_world/cm7/mdk/hello_world_cm7.uvmpw

<install_dir>/boards//evkmimxrt1180/multicore_examples/hello_world/cm33/mdk/hello_world_cm33.uvmpw

Build both applications separately by clicking the Rebuild button. Build the application for the auxiliary core (cm7) first, because the primary core application project (cm33) needs to 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.

Because the auxiliary core runs always from RAM, debug and release RAM targets are present in the project only. When building the primary core project, it is possible to select flexspi_nor_debug/flexspi_nor_release Flash targets. When choosing Flash targets the auxiliary core binary is linked with the primary core image and stored in the external SPI Flash memory. During the primary core execution the auxiliary core image is copied from flash into the CM7 RAM and executed.

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 1 – Step 3 as described in Build a multicore example application.

  2. For the secondary core project, select the Load Application at Startup button as shown in Figure 1. These steps are common for both single-core and dual-core applications in μVision.

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

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

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