cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Unable to build p2p_Server sample application

ACoad.1
Associate II

Environment:

MacOS 10.14.6

STM32CubeIDE 1.6.1

STM32WB SDK 1.11.0

Starting with a clean install of Cube, SDK, empty workspace. Importing p2p_Server project (from the initial splash screen->Import STM32 sample app), the build fails with (among other):

/Users/skajam66/Developer/stm/workspace/BLE_p2pServer/STM32_WPAN/App/app_ble.c:517:11: error: 'handleNotification' undeclared (first use in this function); did you mean 'HRS_Notification'?
  517 |           handleNotification.P2P_Evt_Opcode = PEER_CONN_HANDLE_EVT;
      |           ^~~~~~~~~~~~~~~~~~
      |           HRS_Notification
/Users/skajam66/Developer/stm/workspace/BLE_p2pServer/STM32_WPAN/App/app_ble.c:517:11: note: each undeclared identifier is reported only once for each function it appears in
/Users/skajam66/Developer/stm/workspace/BLE_p2pServer/STM32_WPAN/App/app_ble.c:517:47: error: 'PEER_CONN_HANDLE_EVT' undeclared (first use in this function); did you mean 'HIDS_CONN_HANDLE_EVT'?
  517 |           handleNotification.P2P_Evt_Opcode = PEER_CONN_HANDLE_EVT;

Adding an include statement in app_ble.c:

#include "p2p_server_app.h"

gets rid of the second error. Adding a handleNotification variable:

/* USER CODE BEGIN PTD */
P2PS_APP_ConnHandle_Not_evt_t handleNotification;
/* USER CODE END PTD */

gets rid of the first error but now throws up multiple linker errors:

app_ble.c:519: undefined reference to `P2PS_APP_Notification'
app_ble.c:637: undefined reference to `P2PS_APP_SW1_Button_Action'
p2p_stm.c:139: undefined reference to `P2PS_STM_App_Notification'

All of these symbols are implemented in p2p_server_app.c which is not getting compiled. Both p2p_server_app.c and p2p_server_app.h are in the same build directory as app_ble.c but p2p_server.c is not being compiled.

Is there a configuration setting that I am missing? Seems odd that a core source file for BLE_Server is not getting picked up.

Regards,

ac

0 REPLIES 0