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 (for this guide)
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:
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.
Open the IAR workspace file (
*.eww
file format) highlighted file in the figure below.Wireless UART IAR demo project location
Choose between Debug and Release configurations in the drop-down selector above the project tree in the workspace.
Select the desired configuration (Debug or Release)
The figure below shows the Wireless UART - IAR workspace.
Wireless UART - IAR workspace
Build the Wireless UART project using the options shown in the figure.
Build Wireless UART application
Make the appropriate debugger settings in the project options window, as seen in the next figure.
Go to: Project > Options (Alt+F7) > Debugger > Setup (tab) > Driver > J-Link/J-Trace
Debugger Settings for the Wireless UART project
Click the “Download and Debug” button (or CTRL+D) to flash the executable onto the board.
Download and Debug the Wireless UART application
Press Go (F5). At this moment, the board starts running the application.
Running the code on IAR
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:
Open MCUXpresso IDE and open an existing or new workspace location.
Select MCUXpresso IDE workspace
Drag and drop the package archive into the MCUXpresso Installed SDKs area in the lower right of the main window.
Installed SDKs in MCUXpresso IDE workspace
After the SDK is loaded successfully, select the “Import the SDK examples(s)…” to add examples to your workspace.
Importing SDK example(s)
To select the desired example(s), select the kw45b41zevk / kw45b41zloc / k32w148evk / kw47evk / frdmmcxw71 / frdmmcxw72 / mcxw72evk / kw47loc board and then click the “Next” button:
Selecting the KW47-EVK board
Select Wireless UART FreeRTOS project
Build the
wireless_uart_freertos
project.Build the Wireless UART FreeRTOS project
Click the “Debug” button to download the executable onto the board. Make sure you select the appropriate device to flash.
Download and debug the Wireless UART FreeRTOS project
Pressing the Run button makes the board run the application.
Running the code on MCUXpresso IDE
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:
Open Visual Studio Code and open the MCUXpresso for Visual Studio Code extension as shown in the figure below.
MCUXpresso for Visual Studio Code extension
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”.
Steps to import the SDK
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”.
Steps to import the example application
The application now appears in the “Projects” tab on the left. Build the application by pressing the “Build selected” button.
Building the Wireless UART FreeRTOS application
After the build is completed successfully, debug the application by clicking the “Debug” button.
Debug the Wireless UART FreeRTOS application
Press the run (“Continue”) button twice to run the application on the board.
Running the Wireless UART FreeRTOS application
Parent topic:Building the binaries