1. Presentation
This page describes how to build easily and install STM32WBA Bluetooth® Low Energy example applications.
Project examples can be found on STM32CubeWBA MCU Package[1], and are available for different platforms.
STMicroelectronics Bluetooth® Low Energy example project directory |
---|
Some of the following information can be retrieved from the STM32WBA application note.
2. Requirements
2.1. Software and system requirements
The required softwares are the following (minimum IDEs version):
- IAR Embedded Workbench for Arm (EWARM) toolchain V9.20.1, plus a patch available in the WBA firmware package: STM32Cube_FW_WBA_Vx.x.x/Utilities/PC_Software/EWARMv8_STM32WBAx_V1.3.zip
- RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.38, plus a patch available in the WBA firmware package: STM32Cube_FW_WBA_Vx.x.x/Utilities/PC_Software/Keil.STM32WBAx_DFP.1.3.0.zip
- STM32CubeIDE toolchain V1.15.0 [2].
The required programmer is the following:
- STM32CubeProgrammer[3]: To flash the board with an already generated binary
2.2. Hardware requirements
The board NUCLEO-WBA55CG [4] or STM32WBA55G-DK1[5] is necessary to install the application.
NUCLEO-WBA55CG | STM32WBA55G-DK1 |
---|---|
3. Bluetooth® Low Energy Host Stack and Link Layer libraries compatibilities
In order to use Bluetooth® Low Energy connectivity in STM32WBA projects, an association of two libraries is required:
- One library implementing the Link Layer
- One library for the STLINK Layer Controller(called sometimes in documentation Bluetooth® Low Energy Controller) and/or Bluetooth® Low Energy Host Stack
Bluetooth® Low Energy Stack interface | |
---|---|
Host Stack Solution | Link Layer Only Solution |
Different Bluetooth® Low Energy Host Stack variants are available in the STM32WBA package, depending on project requirements. Depending on the variant, the associated Link Layer library must be included in the project:
- stm32wba_ble_stack_full.a: full host stack + ST LL controller, requires LinkLayer_BLE_Full_lib.a to work.
- stm32wba_ble_stack_basic.a: basic host stack + ST LL controller (basic features), requires LinkLayer_BLE_Basic_lib.a to work.
- stm32wba_ble_stack_llo.a: ST LL controller only, requires LinkLayer_BLE_Full_lib.a to work.
- stm32wba_ble_stack_llobasic.a: ST LL controller (basic features) only, requires LinkLayer_BLE_Basic_lib.a to work.
It is possible to interact directly at HCI + ACI interface (or HCI in LL only case) level by using STM32CubeMonitor-RF and the Transparent Mode application. See STM32WBA TransparentMode wiki page for more information.
Information about the Bluetooth® Low Energy Host Stack and Link Layer libraries, and the different configurations for STM32WBA projects are available in: STM32Cube_FW_WBA_Vx.x.x/Middlewares/ST/STM32_WPAN/ble/stack/doc/STM32WBA_BLE_Stack_User_Manual.html
4. Build and install the application
This section describes the build process using IAR Embedded Workbench, MDK-ARM or STM32CubeIDE.
4.1. Build with IAR Embedded Workbench IDE
Select the application that you want to build. Open the IAR (EWARM) dedicated directory and launch the project.eww IAR file to open the demonstration project on IDE.
IAR project directory |
---|
|
Ensure that your project is correctly visible into the Project explorer view.
Build your project by reproducing the following steps:
IAR: build |
---|
You can build and flash the project on your board by clicking on the button illustrated below:
IAR: build and flash memory |
---|
4.2. Buid with STM32CubeIDE
Select the application that you want to build. Open the STM32CubeIDE dedicated directory and launch the Cube IDE.project of the demonstration.
STM32CubeIDE project folder |
---|
|
Ensure that your project is correctly visible into the Project explorer view.
Build you project by reproducing the following steps:
STM32CubeIDE: build |
---|
Flash it on the board:
STM32CubeIDE: Flash memory |
---|
4.3. Build with MDK-ARM IDE
Select the application you want to build, open the Keil (MDK-ARM) dedicated directory and launch the .uvprojx file to open the demonstration project on IDE.
MDK-ARM project folder |
---|
|
Ensure your project is correctly visible into the Project Explorer view.
Build your project by reproducing the following steps:
MDK-ARM: build |
---|
Error creating thumbnail: File missing |
You can flash the project and launch debug session on your board by clicking on the button as illustrated below:
MDK-ARM: build and flash |
---|
4.4. Install from STM32CubeProgrammer
It is possible to flash the binary built following the IAR Embedded Workbench IDE or STM32CubeIDE section, using the STM32CubeProgrammer software[3].
Select your device and connect to it:
STM32CubeProgrammer: platform connection |
---|
Once connected, the device information is displayed on the STM32CubeProgrammer interface. Click on the programming icon, in the left column, and select the project binary to flash:
- STM32Cube_FW_WBA_V[...]\Projects\[...]\Applications\BLE\BLE_p2pServer\[...]\ BLE_p2pServer.bin
Set the Start address to 0x08000000.
Then, click ok on the Start Programming button:
STM32CubeProgrammer: flash project |
---|
Error creating thumbnail: File missing |
When the programming is complete, the following logs are displayed:
STM32CubeProgrammer: logs |
---|
5. References