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 LPCXpresso54018 hardware platform is used as an example, although these steps can be applied to any demo or example application in the MCUXpresso SDK.
Before downloading and running the application, perform these steps:
Download and install LPCScrypt or the Windows® operating systems driver for LPCXpresso boards from www.nxp.com/lpcutilities. This installs the required drivers for the board.
Connect the development platform to your PC via USB cable between the Link2 USB connector (named Link for some boards) and the PC USB connector. If you are connecting for the first time, allow about 30 seconds for the devices to enumerate.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM port (to determine the COM port number, see Appendix A). Configure the terminal with these settings:
115200 or 9600 baud rate, depending on your board (reference BOARD_DEBUG_UART_BAUDRATE variable in board.h file)
No parity
8 data bits
1 stop bit
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 a non-XIP (plain load) 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/lpcxpresso54018/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 a non-XIP (plain load) example application
To debug the application, click the “Start/Stop Debug Session” button, highlighted in red.
Note: The application is only downloaded into the SRAM when debugging. If you need to program the image to external flash, see Section 4.4, “How to program the non-XIP (plain load) example application to external flash”.
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 is not true, check your terminal settings and connections.
Parent topic:Run a demo using Keil® MDK/μVision
How to program the non-XIP (plain load) example application to external flash
Click the configure target option button and select the “SYSRESETREQ” reset option.
Select the “Flash Download” option and click the “Add” button.
Select the “LPC540xx W25Q128JVFM SPIF” option. For the LPCXpresso54018 board, select “LPC540xx MX25L12835FM2I” for the LPC54018-IoT-Module. Then, click the “Add” button.
Set 0x00000000 as the start address and click the “OK” button.
Click the “LOAD” button.
Note: If ‘LOAD’ fails, press the SW4 button on the board, then repower the board or reset the board (get into ISP mode). Keep pressing SW4 when clicking the ‘LOAD’ button again to program the application into the external flash.
Press the reset button on the board to run the example.
The hello_world application is now running and a banner is displayed on the terminal. If this is not true, check your terminal settings and connections.
Parent topic:Run a demo using Keil® MDK/μVision
How to program the non-XIP (plain load) example application to external flash using J-Link
Click the configure target option button and select the “Normal” reset option.
Select the “Flash Download” option and click the “Add” button.
Select the “LPC540xx W25Q128JVFM SPIF” for the LPCXpresso54018 board , select “LPC540xx MX25L12835FM2I” for the LPC54018-IoT-Module option, and click the “Add” button.
Note: Select “LPC540xx MX25L12835FM2I” for the LPC54018-IoT-Module.
Set 0x00000000 as the start address and click the “OK” button.
Click the “LOAD” button.
Note: If ‘LOAD’ fails, press the SW4 button on the board, then repower the board or reset the board (get into ISP mode). Keep pressing SW4 when clicking the ‘LOAD’ button again to program the application into the external flash.
Press the reset button on the board to run the example.
The hello_world application is now running and a banner is displayed on the terminal. If this is not the case, check your terminal settings and connections.
Parent topic:Run a demo using Keil® MDK/μVision
Build an XIP 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/lpcxpresso54018/demo_apps/hello_world_qspi_xip/mdk/hello_world_qspi_xip.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 XIP example application
Click the “LOAD” button, highlighted in red.

Press the reset button on the board to run the example.
The hello_world application is now running and a banner is displayed on the terminal. If this is not true, check your terminal settings and connections.
Parent topic:Run a demo using Keil® MDK/μVision