Closed tim-nordell-nimbelink closed 2 years ago
Hi @tim-nordell-nimbelink,
Thank you for this other report. Your request has been forwarded to our development team. We will get back to you as soon as they provide us with their feedback.
With regards,
Hi @tim-nordell-nimbelink,
The issue has been reported to our development team and they confirmed it. A fix will be implemented and made available in future release. Thank you once again for your contribution.
With regards,
ST Internal Reference: 94220
Hi @tim-nordell-nimbelink,
I hope you are fine. The issue you reported has been fixed in the frame of version v1.10.0 of the STM32CubeWB published recently on GitHub.
Thank you again for having reported.
With regards,
Hi @ASELSTM -
Unfortunately, the fix isn't quite correct. The code was changed to use "cmsis_compiler.h", but that provides a WEAK definition, not a weak definition. The rest of the code in the .c file was left with __weak. The end result is this:
Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:64:7: error: expected ';' before 'void'
64 | __weak void BLS_Init( void )
| ^~~~~
| ;
Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:68:7: error: expected ';' before 'void'
68 | __weak void CRS_STM_Init( void )
| ^~~~~
| ;
Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:72:7: error: expected ';' before 'void'
72 | __weak void DIS_Init( void )
| ^~~~~
| ;
Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:76:7: error: expected ';' before 'void'
76 | __weak void EDS_STM_Init( void )
| ^~~~~
| ;
...
Changing the definitions to __WEAK fixes it:
-__weak void BLS_Init( void )
+__WEAK void BLS_Init( void )
...
-__weak void CRS_STM_Init( void )
+__WEAK void CRS_STM_Init( void )
...
since that matches the include file that was added.
Thanks, Tim
Hi @tim-nordell-nimbelink,
Thank you for bringing this to our attention, I will let our development team know about this. Thank you once again for your contribution.
Best regards,
ST Internal Reference: 120815.
Please definitely change the weak to WEAK so that things "just work" please definitely don't add a HAL dependency to this core library :) Most of the rest of the STM32_WPAN middleware uses WEAK correctly, there's just a few files that have weak instead.
This looks like this was fixed in v1.13.2.
The svc_ctl.c is depending on a compiler specified include to provide the weak definition. The .c file should include either #include "stm32wbxx_hal_def.h", or using the CMSIS provided WEAK definition via "cmsis_compiler.h". Without modifying this file (or the compiler include directives), you end up with: