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 appropriate CMSIS pack.
Open the MDK IDE, which is called μVision. In the IDE, select the Pack Installer icon.
|
|
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
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: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:
See the table in Default debug interfaces to determine the debug interface that comes loaded on your specific hardware platform.
For boards with the CMSIS-DAP/mbed/DAPLink interface, visit mbed Windows serial configuration and follow the instructions to install the Windows operating system serial driver. If running on Linux OS, this step is not required.
The user should install LPCScrypt or MCUXpresso IDE to ensure that LPC board drivers are installed.
For boards with a P&E Micro interface, visit www.pemicro.com/support/downloads_find.cfm and download and install the P&E Micro Hardware Interface Drivers package.
If using J-Link either a standalone debug pod or OpenSDA, install the J-Link software (drivers and utilities) from www.segger.com/jlink-software.html.
For boards with the OSJTAG interface, install the driver from www.keil.com/download/docs/408.
Connect the development platform to your PC via USB cable using OpenSDA USB connector.
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
BOARD_DEBUG_UART_BAUDRATE
variable in theboard.h
file)No parity
8 data bits
1 stop bit |
|
In μVision, after the application is built, click the Download button to download the application to the target.
|
|
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.
|
|
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 steps to build and run a dual-core application. The demo applications workspace files are located in this folder:
*<install\_dir\>/boards/<board\_name\>/multicore\_examples/<application\_name\>/<core\_type\>/mdk*
Begin with a simple dual-core version of the Hello World application. The multicore Hello World Keil MSDK/μVision workspaces are located in this folder:
*<install\_dir\>/boards/lpcxpresso54114/multicore\_examples/hello\_world/cm0plus/mdk/hello\_world\_cm0plus.uvmpw*
*<install\_dir\>/boards/lpcxpresso54114/multicore\_examples/hello\_world/cm4/mdk/hello\_world\_cm4.uvmpw*
Build both applications separately by clicking the Rebuild button. Build the application for the auxiliary core (cm0plus) first because the primary core application project (cm4) 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
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 device flash memory. After clicking the “Run” button, the primary core application is executed. During the primary core code execution, 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 does not appear, 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.
|
|
Arm describes multicore debugging using the NXP LPC54114 Cortex-M4/M0+ dual-core processor and Keil uVision IDE in Application Note 318 at www.keil.com/appnotes/docs/apnt_318.asp. The associated video can be found here.
Parent topic:Run a demo using Keil MDK/μVision