2025-08-12 3:55 AM
Hello,
I’m working with STM32WB55. I used this example:
STM32WB-BLE-HID-Selfie (https://github.com/stm32-hotspot/STM32WB-BLE-HID-Selfie).
I have a working Mouse HID over GATT using that project (no .ioc).
Now I want to create a new CubeMX (.ioc) project for my product (so I can configure peripherals in CubeMX), and reuse the HID logic from the Selfie example. I’m not sure what the minimal, correct set of files and steps is.
Environment
MCU/Board: STM32WB55 (my custom board)
STM32CubeWB FW pack: v1-23-0
STM32CubeIDE: v1.19.0
Wireless Coprocessor on CPU2: BLE Full Stack
What I tried
Created a new .ioc project with BLE → Custom Template.
I can see the middleware and app files in Includes, but I’m unsure which files from the Selfie example I should copy and where.
I’m also not certain where to call the HID init functions in the generated code.
What I’m asking
What is the minimal set of files to copy from BLE_HID_Selfie into a .ioc project? (e.g. hids.c/.h, hids_app.c/.h, hid_report_desc.c, Utilities/sequencer, and the whole Middlewares/ST/STM32_WPAN tree?)
Where should I place those files in a typical .ioc project structure? (e.g. alongside STM32_WPAN/App/app_ble.c?)
Which include paths / preprocessor defines are required in CubeIDE?
In the generated code, where should I call HIDS_Init() and HIDSAPP_Init()? (Inside SVCCTL_Init() and after APP_BLE_Init() respectively?)
Do I need to replace the linker script (.ld) with the one from Selfie (for SRAM2A/2B reservations)?
Any other version-sync requirements (e.g., must the Wireless Coprocessor version match the middleware exactly)?
If someone has a small checklist or a “copy-from → paste-to” mapping for integrating the HID service into a .ioc project, that would be extremely helpful.
Thanks!