Building the binaries

This section describes the necessary steps for obtaining the binary files for usage with the boards.

Prerequisites

To build any of the demo applications, you need the following toolchain:

  • IAR Embedded Workbench for Arm (details in release note)

  • MCUXpresso IDE (details in release note)

  • Visual Studio Code with “MCUXpresso for Visual Studio Code” extension (details in release note)

  • Teraterm (version 4.105 or higher)

The Connectivity Software Package does not include support for any other toolchains. The packages must be built with the debug configuration to enable debugging information. This package includes various sample applications that can be used as a starting point.

Conventions for building the wireless_UART application.

The following sections present the steps required for building the wireless_UART application. All applications can be found using the following placeholders for text:

  • <connectivity_path>: represents the root path for the SDK.

  • <board>: represents the target board for the demo app, “kw47evk” in this case.

  • <RTOS>: represents the scheduler or RTOS used by the app; it can be either “bm” or “freertos”.

  • <demo_app>: represents the demo application name.

  • <IDE>: represents the integrated development environment used to build projects; “iar” in this case.

  • <core_id>: represents the target CPU on which the application will run, “cm33_core0” in this case (applicable only on KW47-EVK, KW47-LOC, MCX-W72-EVK and FRDM-MCXW72 boards).

  • The general folder structure of the demo applications is the following:

    <connectivity_path>\boars\<board>\wireless_examples\bluetooth\<demo_app>\<core_id>\<RTOS>\<IDE>

Selected application: w_uart

Board: One of the following boards:

  • kw45b41zevk

  • kw45b41zloc

  • k32w148evk

  • frdmmcxw71

  • kw47evk

  • kw47loc

  • mcxw72evk

  • frdmmcxw72

RTOS: FreeRTOS

Resulting location:

<connectivity_path>\boards\<kw45b41zevk / kw45b41zloc / k32w148evk / frdmmcxw71 / kw47evk / kw47loc / mcxw72evk / frdmmcxw72>\wireless_examples\bluetooth\w_uart\freertos\<IDE>

Building and flashing the BLE software demo applications using IAR Embedded Workbench

Use the following steps in order to build and flash the BLE software demo applications using the IAR Embedded Workbench:

  1. First unpack the contents of the archive to a folder on the local disk. Then, navigate to the resulting location starting from the SDK root directory.

  2. Open the IAR workspace file (*.eww file format) highlighted file in Figure 1.

  3. Choose between Debug and Release configurations in the drop-down selector above the project tree in the workspace, as seen in Figure 2.

    Figure 3 shows the Wireless UART - IAR workspace.

  4. Build the Wireless UART project using the options shown in Figure 4.

  5. Make the appropriate debugger settings in the project options window, as seen in Figure 5.

    Project > Options (Alt+F7) > Debugger > Setup (tab) > Driver > J-Link/J-Trace

  6. Click the “Download and Debug” button (or CTRL+D) to flash the executable onto the board, as seen in Figure 6.

  7. Press Go (F5). At this moment, the board starts running the application as shown in Figure 7.

Parent topic:Building the binaries

Building and flashing the BLE Software Demo applications using MCUXpresso IDE

To build and flash the BLE software demo applications using MCUXpresso IDE, follow the steps listed below:

  1. Open MCUXpresso IDE and open an existing or new workspace location.

  2. Drag and drop the package archive into the MCUXpresso Installed SDKs area in the lower right of the main window.

  3. After the SDK is loaded successfully, select the “Import the SDK examples(s)…” to add examples to

    your workspace.

  4. To select the desired example(s), select the kw45b41zevk / kw45b41zloc / k32w148evk / kw47evk / frdmmcxw71 / frdmmcxw72 / mcxw72evk / kw47loc board and then click the “Next” button:

  5. Build the wireless_uart_freertos project.

  6. Click the “Debug” button to download the executable onto the board. Make sure you select the appropriate device to flash.

  7. Pressing the Run button makes the board run the application.

Parent topic:Building the binaries

Building and flashing the BLE software demo applications using Visual Studio Code

To build and flash the BLE software demo applications using Visual Studio Code, follow the steps listed below:

  1. Open Visual Studio Code and open the MCUXpresso for Visual Studio Code extension as shown in the figure below.

  2. Import the SDK package: click “Import Repository”. Then, choose the “Local” option (if the SDK is archived use “Local archive”), browse to the path of the SDK you want, and click “Import”.

  3. After the SDK is loaded successfully, select the “Import Example from Repository” to add an application to your workspace. Choose the repository, toolchain (Arm GNU), board, example you want to add, and the location where the VS Code project would be created. Then click “Create”.

  4. The application now appears in the “Projects” tab on the left. Build the application by pressing the “Build selected” button.

  5. After the build is completed successfully, debug the application by clicking the “Debug” button.

  6. Press the run (“Continue”) button twice to run the application on the board.

Parent topic:Building the binaries