3. Build, Run
A short video is provided to walk you through this process or you can follow along the steps below.
3.1 Explore the MCUXpresso SDK Example Code
The MCUXpresso SDK comes with a long list of example applications code. To see what's available, browse
to the SDK boards folder of your SDK installation and select LPCXpresso55S69.
To learn more about specific example code, open the readme.txt file in an example’s directory.
3.2 Building and Debuging MCUXpresso SDK Examples
If one or more of the demo applications or driver examples sounds interesting, you're probably wanting to know how you can build and debug yourself. The Getting Started with MCUXpresso SDK guide provides easy, step-by-step instructions on how to configure, build, and debug demos for all toolchains supported by the SDK.
Use the guide below to learn how to open, build and debug an example application using the MCUXpresso IDE.
Import the MCUXpresso SDK
- Open the MCUXpresso IDE
- Switch to the Installed SDKs view within the MCUXpresso IDE window
- Drag and drop the LPCXpresso55S69 SDK (zipped) file into the Installed SDKs view.
You will get the following pop-up. Click on
OK to continue the import:
- The installed SDK will appear in the Installed SDKs view as shown below:
Build an Example Application
The following steps will guide you through opening the hello_world example
- Find the Quickstart Panel in the lower left-hand corner
Click on the LPCXpresso55S69 board to select that you want to import an example that can run on that board, and then click on Next.
Use the arrow button to expand the
demo_apps category, and then click the checkbox next to hello_world to select that project. To use the UART for printing (instead of the default semihosting), Select UART as the SDK Debug Console checkbox under the project options. Then, click on Finish.
Now build the project by clicking on the project name and then in the Quickstart Panel click on Build or press “Ctrl + b”. Or you can click on the hammer icon in the tool bar.
You can see the status of the build in the console tab.
Run an Example Application
- Now that the project has been compiled, you can now flash it to the board and run it.
- Make sure the LPCXpresso51U68 board is plugged in, and click on Debug in the Quickstart Panel.
- MCUXpresso IDE will probe for connected boards and should find the CMSIS-DAP debug probe that is part of the integrated LPC-LINK2 circuit on the LPCXpresso55S69. Click on OK to continue.
- Select the Cortex-M33 Device or Core 0 and press OK.
- The firmware will be downloaded to the board, and the debugger started.
- Open a terminal program and connect to the COM port the board enumerated as. Configure the terminal with these settings:
- Start the application by clicking the "Resume" button:
- 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. You can type on the terminal console and the characters will be echoed back.
- Use the controls in the menu bar to pause, step into, and step over instructions, and then stop the debugging session by click on the Terminate icon:
Using a different toolchain?
This demo is also available for IAR and KEIL.
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.
- In the Pack Installer window, search for “LPC55S69” to bring up the LPC55S69 family. Click on the LPC55S69 name, and then in the right-hand side you’ll see the NXP::LPCXpresso55S69 _DFP pack. Click on the “Install” button next to the pack. This process requires an internet connection to successfully complete. You can do the same thing for the LPCXpresso55S69 board support package.
- After the installation finishes, close the Pack Installer window and return to the µVision IDE.
Build the Example Application
The following steps will guide you through opening the hello_world application. These steps may change slightly for other example applications as some of these applications may have additional layers of folders in their path.
If not already done, open the desired demo application workspace in:
The workspace file is named .uvmpw, so for this specific example, the actual path is:
For example the power manager example project file is here
- To build the demo project, select the "Rebuild" button, highlighted in red.
- The build will complete without errors
Run an Example Application
- The LPCXpresso55S69 board comes loaded with the CMSIS-DAP debug interface from the factory. If you have changed the debug LPC-LINK2 application on your board, check the LPCScrypt tutorial describe in the past section.
- Connect the development platform to your PC via USB cable to P6 “Debug Link”. Ensure the DFULink jumper (
J4) is removed when powering the board to boot the debug probe from internal flash.
Open the terminal application on the PC (such as PuTTY or Tera Term) and connect to the debug COM port you determined earlier. Configure the terminal with these settings:
- 115200 baud rate
- No parity
- 8 data bits
- 1 stop bit
- After the application is properly built, click the "Download" button to download the application to the target.
- Click on “Start/Stop Debug Session” to open the debug view.
- Run the code by clicking the "Run" button to start the application.
- The application is now running, you are going to see the RGB blue led Blinky every second.
3.3 Building and Debuging MCUXpresso SDK Examples
Now its time to plug in the board to debug your project:
- Make sure the DFU jumper J4 is removed
- Plug the micro USB cable from the PC into the Debug Link micro USB connector as shown
- In the Project Exporer window in MCUXpresso select your project
- In the Quick Start Panel click on Debug
- Choose the CMSIS-DAP debug interface
- Choose Core 0 for the target core
- Hit Resume to get the code running after the breakpoint at the beginning of main ()
More details can be found in the SDK getting started documents found in the SDK folder
<SDK_Install_Directory>/docs/Getting Started with MCUXpresso SDK for LPC55xx.pdf
3.4 More Examples
Several examples, demos and drivers are available within the SDK to help you get started. Some common examples are listed below:
- Shell demo (UART example)
- USB examples
- NTAG I2C explorer blink
- Power manager demo