Skip to content

Latest commit

 

History

History
97 lines (57 loc) · 5.99 KB

run_a_project_using_mcux.md

File metadata and controls

97 lines (57 loc) · 5.99 KB

Previous Page

This section describes the steps required to configure MCUXpresso IDE to build, run, and debug example applications.

1️⃣Set up Environment

1. Install MCUXpresso IDE

  1. Download MCUXpresso IDE from LINK.

  2. Open MCUXpresso IDE, select 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.

2️⃣Build an example application

To build an example application, follow these steps.

The step 1 differs according to the version of MCUXpresso IDE. If you are using MCUXpresso IDE version above 11.5.0, please follow below first step:

  1. Right-click the empty space in the Installed SDKs view to show the menus, select Import local SDK Git repository and input the root folder of west workspace(mcuxsdk), then IDE will be able to recognize all boards support in local GitHub SDK repository. Import local directory Import local git Default manifests core Local github repositories

As shown in above picture, the default manifests folder chosen by IDE is core/manifests, with the setting IDE will list the latest and newest board support in MCUXpresso SDK. If you want to have the full board support(such as FRDM-K64F), please follow below guidance to manually switch to the examples/manifests folder: Change manifests to examples Manifests examples

Else if you are using IDE version older than 11.5.0, you need to refer to below step 1.

  1. Copy the board manifest file from the examples/manifests folder to the root folder of west workspace(mcuxsdk) to explore MCUXpresso IDE build and debug for example application of specified board. Then you drag and drop the west workspace into the Installed SDKs view to install the MCUXpresso SDK. In the window that appears, click the OK button and wait until the import has finished.

     *Take FRDM-K28FA as an example, copy FRDM-K28FA_manifest_v3_8.xml file in `manifests` folder to the repository root directory.*
    

    Install SDK

The other steps for import, build and run an example are same for different IDE versions.

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

    Import an SDK example

  2. In the window that appears, expand the MIMXRT1020 folder and select MIMXRT1021xxxxx. Then, select evkmimxrt1020 and click the Next button.

    Selecting EVK-MIMXRT1020 board

  3. Expand the demo_apps folder and select hello_world. Then, click the Next button.

    Selecting hello_world

    ❗ NOTE
    If you want to use semihost to print log, first select the Semihost button when importing projects.

    Selecting User floating point version of printf

  4. Ensure the option Redlib: Use floating point version of printf is selected if the cases print floating point numbers on the terminal (such as mmcau_examples mmcau_api). Otherwise, there is no need to select it. Click the Finish button.

    Selecting User floating point version of printf

  5. On the Quickstart panel, click build evkmimxrt1020_demo_apps_hello_world [Debug].

    Building hello world case

3️⃣Run an example application

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

To download and run the application, perform these steps:

❗ NOTE
If you are using our evaluation board which uses flashless soc, please make sure that the board is on QSPI_Flash mode before download. (For EVK-MIMXRT1020 in the example, set t SW8: 0010).
  1. On the Quickstart panel, click Debug evkmimxrt1020_demo_apps_hello_world [Debug].

    Debugging hello_world case

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

    Attached Probes: debug emulator selection

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

    Stop at main() when running debugging

  4. Start the application by clicking the Resume button.

    Resume button

The hello_world application is now running and a banner is displayed on the MCUXpresso IDE console window. If this is not the case, check your terminal settings and connections.

Text display of the hello_world demo