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 targeted for the TWR-KM35Z75M hardware platform is used as an example, although these steps can be applied to any demo or example application 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.

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

    |

|

  1. 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 <demo_name>.uvmpw, so for this specific example, the actual path is:

    <install_dir>/boards/twrkm35z75m/demo_apps/hello_world/mdk/hello_world.uvmpw
    
  • To build the demo project, select the Rebuild button, 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:

  1. See the table in Default debug interfaces to determine the debug interface that comes loaded on your specific hardware platform.

  2. Connect the development platform to your PC via USB cable using OpenSDA 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:

    1. 115200 or 9600 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE variable in the board.h file)

    2. No parity

    3. 8 data bits

    4. 1 stop bit |

|

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

    |

|

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

    |

|

  1. Run the code by clicking Run 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.

|![](../images/text_display_hello_world.png "Text display of the hello_world
										demo")

|

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