Skip to main content

NXP MCUXpresso IDE

This section is a guide to open, build and debug an example application using NXP MCUXpresso IDE. It is assumed that you have this development environment installed on your computer.

Install the SDK

MCUXpresso requires the SDK to be installed before it can be used. To do that start MCUXpresso and then drag-n-drop the SDK zip file that was downloaded in the Download the SDK section to the Installed SDKs tab in MCUXpresso:

MCUXpresso - Installed SDKs

During the installation MCUXpresso will make a copy of the zip file that you drag-n-dropped so it is ok to delete it afterwards if you don't need it for one of the other IDEs.

Build an Example Application

The following steps will guide you through opening the hello_world application from the SDK.

  1. Install the SDK as described above if you have not done so already

  2. Click the Import SDK example(s)... link in the Quickstart Panel

    MCUXpresso - Import SDK examples

  3. Select the iMX RT Developer’s Kit (in this case the eaimxrt1176). Click Next to go to the project selector.

    MCUXpresso - Select board

  4. Select the hello_world example for Cortex-M7 (ends in _cm7) and make sure to switch from Semihost to UART for the SDK Debug Console.

    MCUXpresso - Import projects

  5. Click Finish to have MCUXpresso import and set up the selected project.

  6. Click Build in the Quickstart Panel.

    MCUXpresso - QuickStart Panel

  7. The build will complete without errors.

Run an Example Application

To download and run the application, perform these steps:

  1. Prepare the hardware as described in the Preparing the hardware section and power it on.

  2. Open the terminal application on the PC, such as TeraTerm or PuTTY, and connect to the virtual COM port. Configure the terminal with 115200 baud, 8N1. You can alter the baud rate by searching for the BOARD_DEBUG_UART_BAUDRATE define in fil: board.h

  3. Click the Debug button in the Quickstart Panel to download the application to the target.

    MCUXpresso - Debug button

  4. The application is then downloaded to the target and automatically runs to the main() function.

  5. Run the code by clicking the Resume button to start the application.

    MCUXpresso - Resume button

  6. 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.

    MCUXpresso - Hello world output

Target Memory

Almost all examples for MCUXpresso are setup to run from flash. If the flash is used, or not, can be seen when compiling.

MCUXpresso - Build output in console

To run the program in RAM/SDRAM (if it is small enough to fit).

  1. Open the Project Properties menu and navigate to MCU Settings

    MCUXpresso - MCU Settings

  2. Select the BOARD_FLASH row in the table and then click the Delete button to remove the flash.

  3. Go to Settings and the Preprocessor entry

    MCUXpresso - Preprocessor settings

  4. There are three symbols that must be changed. The symbols are XIP_BOOT_HEADER_DCD_ENABLE, XIP_EXTERNAL_FLASH and XIP_BOOT_HEADER_ENABLE. Double-click each one and change the value from 1 to 0 to disable the feature.

  5. Build the project and look at the output. The BOARD_FLASH is no longer present and instead the SDRAM is used.

    MCUXpresso - Build output when target is SDRAM

Troubleshooting

It is possible that a dialog like this pops up when building your project.

MCUXpresso - Error message

That error message appears because the project was not 100% imported and this happens sometimes if you select multiple projects to import at the same time. To fix the problem you have two choices:

  • Option 1: Right click the project, select Delete and make sure that the checkbox for deleting the content on the disk is filled in. You can then import that project again.
  • Option 2: Switch to a new workspace and only import that project.