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.
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 MIMXRT117x CMSIS pack.
Download the MIMXRT1171, MIMXRT1172, MIMXRT1173, MIMXRT1175 and MIMXRT1176 packs.
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
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/evkbmimxrt1170/demo_apps/hello_world/cm7/mdk/hello_world_demo_cm7.uvmpw
To build the demo project, select Rebuild, highlighted in red.
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:
This board supports the
CMSIS-DAP/mbed/DAPLink
debug probe by default. Visit MBED serial-configuration and follow the instructions to install the Windows® operating system serial driver. If running on Linux OS, this step is not required.Connect the development platform to your PC via USB cable.
Open the terminal application on the PC, such as PuTTY or TeraTerm, J11, 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
BOARD_DEBUG_UART_BAUDRATE
variable in the board.hfile)No parity
8 data bits
1 stop bit
To debug the application, click load or press the F8 key for flexspi target which needs to download the program to flash memory. Then, click the Start/Stop Debug Sessionbutton, highlighted in red in Figure 2. If using J-Linkas the debugger, click Project option>Debug>Settings>Debug >Port, and select SW.
Note:
When using jlink in MDK for cm4 projects, it expects one jlinkscript file named JLinkSettings.JLinkScript in the folder where the uVision project files are located. Please refer to Segger Wiki for more information.
For the contents in this
JlinkSettings.JLinkScript
, use contents inevkbmimxrt1170_connect_cm4_cm4side.jlinkscript
(non-sdram targets) andevkbmimxrt1170_connect_cm4_cm4side_sdram.jlinkscript
(sdram targets).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/evkbmimxrt1170/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/evkbmimxrt1170/multicore_examples/hello_world/cm4/mdk/hello_world_cm4.uvmpw
<install_dir>/boards//evkbmimxrt1170/multicore_examples/hello_world/cm7/mdk/hello_world_cm7.uvmpw
Build both applications separately by clicking the Rebuild button. Build the application for the auxiliary core (cm4) first, because the primary core application project (cm7) 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 CM4 RAM and executed.
Parent topic:Run a demo using Keil MDK/μVision
Run a multicore example application
The primary core debugger flashes both the primary and the auxiliary core applications into the SoC flash memory. To download and run the multicore application, switch to the primary core application project and perform Steps 1 – 5 as described in Run an example application. These steps are common for both single-core and dual-core applications in μVision.
Both the primary and the auxiliary image is loaded into the flash memory. After clicking Run, the primary core application is executed. During the primary core code execution, the auxiliary core code is re-allocated from the SPI flash memory to the RAM, and the auxiliary core is released from the reset. The hello_world
multicore application is now running and a banner is displayed on the terminal. If this is not true, check your terminal settings and connections.
An LED controlled by the auxiliary core starts flashing indicating that the auxiliary core has been released from the reset and is running correctly.
Attach the running application of the auxiliary core by opening the auxiliary core project in the second μVision instance and
clicking the Start/Stop Debug Session button. After this, the second debug session is opened and the auxiliary core
application can be debugged.
Parent topic:Run a demo using Keil MDK/μVision