Getting Started With the LPC5500 Series MCU Using NXP’s MCUXpresso IDEJune 11, 2020 by Mark Dunnett, on Behalf of NXP
This article introduces the MCUXpresso IDE, introducing important features and showing how to get started with programming the LPC65500 series MCU using a Hello World example.
It can be quite daunting when faced with a new microcontroller, especially when development support is provided in a software tool that we have not used before. The purpose of this article is to show a step-by-step guide to getting started with NXP’s ARM Cortex-M33 microcontroller LPC55S69.
We’ll get the microcontroller up-and-running using the free-of-charge MCUXpresso IDE development tool, and learn step-by-step how to install and configure it. And then run a code example from the MCUXpresso SDK software development kit. The code example runs on the LPC55S69 development board LPC55S69-EVK, available direct from NXP and their distributors. Note that sometimes the LPC55S69-EVK is referred to as LPCXpresso55S69, and I will use the names interchangeably in this article.
Downloading the Necessary Software
The standard toolchain for the LPCXpresso55S69 development board is MCUXpresso IDE, a free-of-charge development environment for developing, uploading, and debugging code. It supports a wide range of NXP microcontrollers including the LPC5500 series MCUs featured in this article. It can be downloaded from NXP's website for Windows, Linux, and Mac.
The MCUXpresso IDE used throughout this series is the standard toolchain for NXP's ARM Cortex®-M based MCUs. It offers advanced editing, compiling, and debugging features with the addition of MCU-specific debugging views, multicore debugging, and device configuration mechanisms. All of these tools are joined in a single comprehensive software package, so there's no need to install additional software.
To continue, download and install MCUXpresso IDE (currently version 11.1.1, June 2020) onto your host computer. You may need to register as a new user on NXP’s website if you do not already have a free account. Note also that the installer may ask you for permission to install drivers for debug probes: you should allow this to proceed.
Once MCUXpresso IDE is installed and running, you will be asked to select a Workspace (a location on your computer to store your files), and then be presented with the welcome screen.
Figure 1. MCUXpresso welcome screen.
I’ve highlighted the three most important icons. MCUXpresso IDE comes with a comprehensive set of documentation, and you can make time to review this material. For now, we want to obtain some example code for the LPC55S69-EVK and we do this with the ‘Download and Install SDKs’ button. In the subsequent running of MCUXpresso IDE, we can go to the Development environment by clicking the ‘IDE’ button in the top right-hand corner.
Let’s download the example code SDK Software Development Kit for the LPC55S69-EVK / LPCXpresso55s69. We can do this inside MCUXpresso IDE by selecting the Download and Install SDKs icon. This takes us to the following screen:
Figure 2. Download and install the example code to take you to the next screen.
The screen presents images of all the SDKs that are available and supported by MCUXpresso IDE. There is a great number and so it helps to filter the list by core. The LPCXpresso55s69 development board features the Cortex M33 core, so filter the SDK list by core: check the radio button for Cortex M33.
Figure 3. Filer the list by core to find the Cortex M33.
After filtering on the core, it is easy to identify the lpcxpresso55s69 Software Development Kit: select it by clicking on the board photograph, and then click the [Install] button at the lower edge of the screen. MCUXpresso IDE then proceeds to download and install the SDK onto your host computer. You will need to accept a standard License agreement.
It may take 2-3 minutes for the SDK to be downloaded and installed (it is approximately 100MByte download and the time will depend on your network bandwidth). Once the SDK is installed, you will be returned to the Welcome screen. Select the [IDE] icon to open the MCUXpresso development environment.
Figure 4. Select the IDE icon to open MCUXpresso's development environment.
The IDE will open at the Develop perspective, showing a variety of windows (Views). One view (in the lower part of the screen) is the “Installed SDKs” view, and you will see the SDK that was downloaded at the previous step. As of writing, the lpcxpresso55s69 SDK is version 2.7.1. Note that you may only have one installed SDK. In this screen-shot, I have several others that I have previously installed.
Figure 5. Select the SDK you installed at the beginning of the tutorial.
Running a ‘Hello World’ Example
For the first example, use the Quickstart panel to Import SDK Example that’s bundled with the recently installed SDK:
Figure 6. Import the SDK example from the Quickstart panel.
A new window will open, prompting you to select the relevant development board. The LPC55S69-EVK is shown in the example below. Click the photograph of the lpcxpresso55s69 to select it, and then click [Next].
Figure 7. Find the relevant development board to continue running the example.
The power of the MCUXpresso SDK can be seen in the Import Projects… dialog. There are approaching 100 different code examples, each demonstrating a different feature of the LPC55S69, grouped by category. We will use a Demo Application, and so expand the demo_apps view, and select the example named hello_world.
Figure 8. Select the hello_world example.
After selecting the hello_world example, click the Finish button to import the project into the Development environment.
The project will load, allowing the user to build and debug it from the Quickstart menu. There are no changes required for this example project. You can investigate the code by opening the C-source module hello_world.c (it is in the Source group in the Project Explorer). You can scroll down the code to find main().
Figure 9. Explore the code by opening the C-source module hello_world.c.
When you are ready to build and debug the project, make sure first that you select the project-name lpcxpresso55s69_hello_world in the Project Explorer view. Then connect your lpcxpresso55s69 evaluation board to your host computer. Connect a USB micro cable into the connector labeled Debug Link on the board. Your host computer will install the necessary drivers: this may take up to one minute.
Clicking Debug in the Quickstart view. The code will be built (compiled and linked), and then the Debugger will attempt to connect to the lpcxresso55s69 evaluation board.
MCUXpresso IDE will make a probe discovery and will find the LPC-LINK2 debug probe fitted to the lpcxpresso55s69:
Figure 10. MCUXpresso IDE will find the LPC-LINK2 debug probe fitted to the lpcxpresso55s69.
Select the probe, and click [OK] to continue. These lpcxpresso55s69 projects are built for a dual-core LPC55S69 microcontroller. In most cases, they are targeted at Core 0, and so select Device 0 and click [OK].
MCUXpresso IDE then loads the debug file into the debugger and flashes the code image into the lpcxpresso55s69. The debugger will automatically run the code (through all of the low-level startup code), stopping at the first line of main(). You can run the code with the ‘Resume’ icon (green arrow) or simply press hotkey F8. Since the project is written to print the string “hello world.” you will see this printed into the Console view in the Debug perspective. You may wish to explore what the code does after printing the hello world string.
When you are done in the debugger, click the red ‘Stop’ / Terminate icon to stop the code, close the debugger and return to the Develop perspective.
The Next Steps
MCUXpresso IDE is a powerful development environment for NXP microcontrollers. In addition to the standard features that we used in this article (compiler, debugger, flashloader, SDK examples) It has a comprehensive set of tools included to help us configure the pins, clocks, and peripherals on the microcontroller. Each tool presents a graphical approach to configuring the component, and will then generate the necessary ‘C’ source code *.c and *.h.
There is not space to provide a tutorial for all of these essential tools in this article, however, interested readers can watch my embeddedpro online tutorials. Or if reading is more your thing, then there are also MCUXpresso IDE tutorials available covering tools and more.
Industry Articles are a form of content that allows industry partners to share useful news, messages, and technology with All About Circuits readers in a way editorial content is not well suited to. All Industry Articles are subject to strict editorial guidelines with the intention of offering readers useful news, technical expertise, or stories. The viewpoints and opinions expressed in Industry Articles are those of the partner and not necessarily those of All About Circuits or its writers.