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 LPCXpresso54018 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 a non-XIP (plain load) 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 the “OK” button 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 “LPC540xx folder and select “LPC54018” . Then, select “lpcxpresso54018” and click the “Next” button.

  4. Expand the “demo_apps” folder and select “hello_world”. Then, click the “Next” button.

    ![](../images/select_hello_world_lpc540xx.png “Select “hello_world””)

  5. Ensure the option “Redlib: Use floating point version of printf” is selected if the cases print floating point numbers on the terminal (for demo applications such as adc_basic, adc_burst, adc_dma, and adc_interrupt). Otherwise, there is no need to select it. Click the “Finish” button.

    ![](../images/user_floating_print_version_printf_lpc540xx.png “Select “User floating print version of printf””)

Parent topic:Run a demo using MCUXpresso IDE

Run a non-XIP (plain load) example application

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

To download and run the application, perform these steps:

  1. Reference the table in Appendix B 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.

  2. 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 Appendix A). 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

  3. On the Quickstart Panel, click on “Debug ‘lpcxpresso54018_demo_apps_hello_world’ [Debug]”.

    ![](../images/debug_hello_world_case_lpc540xx.png “Debug “hello_world” case”)

  4. 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 the “OK” button. (For any future debug sessions, the stored probe selection is automatically used, unless the probe cannot be found.)

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

    Note: The application is only downloaded into the SRAM when debugging. If you need to program the image to external flash, see Section 6.4, “How to program the non-XIP (plain load) example bin file to external flash”.

  6. Start the application by clicking the “Resume” button.

The hello_world application is now running and a banner is displayed on the console.

Parent topic:Run a demo using MCUXpresso IDE

How to program the non-XIP (plain load) example bin file to external flash

To build an example application, follow these steps.

  1. Create a bin file for non-XIP (plain load) demo from *.axf file.

  2. Click the “LinkServer GUI Flash Programmer” button.

  3. Select LPC-LINK2 CMSIS-DAP.

  4. Select the flash driver, bin file, and external flash program address, then click the “OK” button to program the bin file to external flash.

  5. After programming, press the reset button on the board to run the example.

Parent topic:Run a demo using MCUXpresso IDE

Build an XIP 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 the “OK” button 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 “LPC540xx folder and select “LPC54018”. Then, select “lpcxpresso54018” and click the “Next” button.

  4. Expand the “demo_apps” folder and select “hello_world_qspi_xip”. Then, click the “Next” button.

    ![](../images/select_hello_world_qspi_xip_lpc540xx.png “Select “hello_world_qspi_xip””)

  5. Ensure the option “Redlib: Use floating point version of printf” is selected if the cases print floating point numbers on the terminal (for demo applications such as adc_basic, adc_burst, adc_dma, and adc_interrupt). Otherwise, there is no need to select it. Click the “Finish” button.

Parent topic:Run a demo using MCUXpresso IDE

Run an XIP example application

  1. Click the “Debug” button on the tool bar to run the XIP example.

Parent topic:Run a demo using MCUXpresso IDE