BTstack Port for STM32 F4 Discovery Board with Ezurio Vela IF310 Devkit

This port uses the STM32 F4 Discovery Board with Ezurio's Vela IF310 Development Kit based on the Infineon AIROC CYW55310.

STCubeMX was used to provide the HAL, initialize the device, and create an initial CMakeLists.txt for CMake. The CMake project can be built from the command line as desrbied below or in modern IDEs, e.g. JetBrains' CLion or Microsoft's Visual Studio Code with the STM32CubeIDE Extension. In addition, SEGGER Ozone project files are generated for debugging.

Hardware

Setup

Switch Name Position Label
S15 FTDI 3V3 Level Shifter OFF ON
S12 FTDI vs RP2040 Switch ON FTDI
S11 Ext. TDM vs. SMARC OFF IF310
S10 TDM1 vs. RP2040 OFF RP2040_TDM1
STM32 PIN Vela IF310 DK PIN CYW55310 Comment Color
GND GND FTDI-GND J16-1 GND Right pin Gray
VDD VDD BT_REG_ON_3V3-3V3 J24-1 VDD Left pin Purple
USART2_TX PA2 N.C. Console TX
USART2_RX PA3 N.C Console RX
Bluetooth Enable PE14 BT_REG_ON_3V3-REG_ON J24-2 BT_REG_ON Middle pin Yellow
USART3_TX PD8 FTDI_3.3-TX J16-4 BT_UART_RX Black
USART3_RX PD9 FTDI_3.3-RX J16-5 BT_UART_TX Brown
USART3_CTS PD11 FTDI_3.3-CTS J16-2 BT_UART_RTS Red
USART3_RTS PD12 FTDI_3.3-RTS J16-6 BT_UART_CTS Orange

Development on the Command Line

Build

The build system uses CMake with the Arm GNU Toolchain

To install dependencies: - macOS - brew install cmake gcc-arm-embedded ninja - Debian/Ubuntu - sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi openocd - Windows - winget install Kitware.CMake Ninja-build.Ninja python3 Git.Git Arm.GnuArmEmbeddedToolchain

To build all examples with Ninja, run cmake in the port folder:

$ cd port
$ cd stm32-f4discovery-cyw55310   
$ cmake -G Ninja -B build
$ cmake --build build

All examples are built in Release mode and placed together with Ozone project files (.jdebug) into the build folder.

If you want to build only a single example, you can pass the name of the example at the end after a double-dash, e.g.

$ cmake --build build -- gatt_counter

Flash using various tools

There are different options to flash and debug the F4 Discovery board. The F4 Discovery boards comes with an on-board ST-Link programmer and debugger.

Please note that the ST-Link/V2 programmer on the F4 Discovery board does not provide a Virtual COM Port like newer versions of SEGGER's J-Link OB. In addition, there are currently no drivers for AMR64 (December 2025).

Popular options are: - OpenOCD - command line - stlink - command line - STM32CubeProgrammer - cross-platform GUI

As an alternative, the ST-Link programmer can be replaced by an SEGGER J-Link OB.

Finally, the STM32 can be programmed with any ARM Cortex JTAG or SWD programmer via the SWD header.

Flash and Debug with Ozone

When using an external J-Link programmer or after installing J-Link OB on the F4 Discovery board, you can flash and debug using the cross-platform SEGGER Ozone Debugger. It is included in some J-Link programmers or can be used for free for evaluation usage.

Just start Ozone and open the EXAMPLE.jdebug file in the build folder for the example you want to run.

When compiled with "ENABLE_SEGGER_RTT" enabled in port/btstack_config.h, the debug console shows up in the Terminal window of Ozone. You might need to enable "Capture RTT" via the Terminal window context menu.

Configuration

Debug Console

All debug console can be either send via SEGGER RTT or via USART2. To get the console from USART2, connect PA2 (USART2 TX) of the Discovery board to an USB-2-UART adapter and open a terminal at 115200.

In port/btstack_config.h additional debug information can be enabled by uncommenting ENABLE_LOG_INFO. Also, the full packet log can be enabled in port/btstack_config.h by uncommenting ENABLE_HCI_DUMP.

The console output can then be converted into .pklg files for OS X PacketLogger or WireShark by running tool/create_packet_log.py.

PatchRAM

The port downloads the latest PatchRAM for the Vela IF310 / CYW55310 from the BlueKitchen Web server.

GATT Database

In BTstack, the GATT Database is defined via the .gatt file in the example folder. The CMakeLists.txt contains rules to update the .h file when the .gatt was modified.