This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Run a demo using MCUXpresso IDE

Note: Ensure that the MCUXpresso IDE toolchain is included when generating the MCUXpresso SDK package.

This section describes the steps required to configure MCUXpresso IDE to build, run, and debug example applications. The hello_world demo application targeted for the LPCXpresso55S16 hardware platform is used as an example, though these steps can be applied to any example application in the MCUXpresso SDK.

Select the workspace location

Every time MCUXpresso IDE launches, it prompts the user to select a workspace location. MCUXpresso IDE is built on top of Eclipse which uses workspace to store information about its current configuration, and in some use cases, source files for the projects are in the workspace. The location of the workspace can be anywhere, but it is recommended that the workspace be located outside of the MCUXpresso SDK tree.

Parent topic:Run a demo using MCUXpresso IDE

Build an example application

To build an example application, follow these steps.

  1. Drag and drop the SDK zip file into the Installed SDKs view to install an SDK. In the window that appears, click OK and wait until the import has finished.

  2. On the Quickstart Panel, click Import SDK example(s)….

  3. In the window that appears, expand the LPC55xx folder and select LPC55S16 . Then, select LPC55S16 and click Next.

  4. Expand the demo_apps folder and select hello_world . Then, select UART as SDK Debug Console andclick Next .

  5. Ensure Redlib: Use floating point version of printf is selected if the example prints floating point numbers on the terminalfor demo applications such as adc_basic, adc_burst, adc_dma, and adc_interrupt. Otherwise, it is not necessary to select this option. Then, click Finish.

Parent topic:Run a demo using MCUXpresso IDE

Run an example application

For more information on debug probe support in the MCUXpresso IDE, see community.nxp.com.

To download and run the application, perform the following steps:

  1. See the table in to determine the debug interface that comes loaded on your specific hardware platform. For LPCXpresso boards, install the DFU jumper for the debug probe, then connect the debug probe USB connector.

    • For boards with CMSIS-DAP/mbed/DAPLink interfaces, visit developer.mbed.org/handbook/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.

    • For boards with a P&E Micro interface, see PE micro to download and install the P&E Micro Hardware Interface Drivers package.

    • For the MRB-KW01 board, see www.nxp.com/USB2SER to download the serial driver. This board does not support the OpenSDA. Therefore, an external debug probe (such as a J-Link) is required. The steps below referencing the OpenSDA do not apply because there is only a single USB connector for the serial output.

    • If using J-Link with 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.

  2. Connect the development platform to your PC via a USB cable.

  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 board.h file)

    2. No parity

    3. 8 data bits

    4. 1 stop bit

  4. On the Quickstart Panel, click on Debug lpcxpresso55s16_hello_world [Debug] to launch the debug session.

  5. The first time you debug a project, the Debug Emulator Selection dialog is displayed, showing all supported probes that are attached to your computer. Select the probe through which you want to debug and click OK. (For any future debug sessions, the stored probe selection is automatically used, unless the probe cannot be found.)

  6. The application is downloaded to the target and automatically runs to main().

  7. Start the application by clicking Resume.

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 MCUXpresso IDE

Build a TrustZone example application

This section describes the steps required to configure MCUXpresso IDE to build, run, and debug TrustZone example applications. The trustzone version of the hello_world example application targeted for the LPCXpresso55S16 hardware platform is used as an example, though these steps can be applied to any TrustZone example application in the MCUXpresso SDK.

  1. TrustZone examples are imported into the workspace in a similar way as single core applications. When the SDK zip package for LPCXpresso55S16 is installed and available in the Installed SDKs view, click Import SDK example(s)… on the Quickstart Panel. In the window that appears, expand the LPC55xx folder and select LPCXpresso55S16. Then, select LPCXpresso55S16 and click Next.

  2. Expand the trustzone_examples/ folder and select hello_world_s. Because TrustZone examples are linked together, the non-secure project is automatically imported with the secure project, and there is no need to select it explicitly. Then select UART as SDK Debug Console. Then, click Finish.

  3. Now, two projects should be imported into the workspace. To start building the TrustZone application, highlight the lpcxpresso55s16\_hello\_world\_s project (TrustZone master project) in the Project Explorer. Then, choose the appropriate build target, Debug or Release, by clicking the downward facing arrow next to the hammer icon, as shown in Figure 3. For this example, select the Debug target.

    The project starts building after the build target is selected. It is requested to build the application for the secure project first, because the non-secure project needs to know the secure project since CMSE library when running the linker. It is not possible to finish the non-secure project linker when the secure project since CMSE library is not ready.

    Note: When the Release build is requested, it is necessary to change the build configuration of both the secure and non-secure application projects first. To do this, select both projects in the Project Explorer view by clicking to select the first project, then using shift-click or control-click to select the second project. Right click in the Project Explorer view to display the context-sensitive menu and select Build Configurations > Set Active >Release. This is also possible by using the menu item of Project > Build Configuration >Set Active >Release. After switching to the Release build configuration. Build the application for the secure project first.

Parent topic:Run a demo using MCUXpresso IDE

Run a TrustZone example application

To download and run the application perform all steps as described in Section 3.3, “Run an example application”. These steps are common for single core, dual-core, and TrustZone applications, ensuring both sides of the TrustZone application are properly loaded and started secure application. However, there is one additional dialogue that is specific to TrustZone examples. See the following figures as reference.

After loading the non-secure application, press RESET on board to release the device connect. Then, highlight the lpcxpresso55s16_trustzone_examples_hello_world_s project (TrustZone master project) in the Project Explorer. In the Quickstart Panel, click lpcxpresso55s16_trustzone_examples_hello_world_s [Debug] to launch the second debug session.

Start the application by clicking Resume. The hello_world TrustZone application then starts running, and the secure application starts the non-secure application during run time.

Parent topic:Run a demo using MCUXpresso IDE