2021-04-06 07:18 AM
Hello
File "STM32_Cryptographic/Inc/Common/macros.h" defines macros MIN and MAX without any "#ifndef" around. Thus compiler warnings "redefined" are generated, if the file is included by customer code after headers of BLE stack.
File STM32WPAN/ble/ble_common.h has following code:
#ifndef MAX
#define MAX( a, b ) (((a) > (b)) ? (a) : (b))
#endif
File STM32WPAN/stm32_wpan_common.h has following code:
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
One of these codes should also be applied in macros.h of crypto lib (same for MIN etc).
Best regards
Paul
2021-04-08 08:28 AM
Hello
there is a similar "opportunity to enhance" for "PAUSE":
In file included from ../Core/Inc/main.h:34,
...
from ../STM32_WPAN/App/custom_stm.c:27:
../Core/Inc/app_common.h:85: warning: "PAUSE" redefined
85 | #define PAUSE( t ) M_BEGIN \
|
In file included from ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h:31,
from ../Middlewares/ST/STM32_WPAN/ble/ble.h:55,
from ../Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h:32,
from ../STM32_WPAN/App/custom_stm.c:23:
../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h:113: note: this is the location of the previous definition
113 | #define PAUSE( t ) M_BEGIN \
|
BR
Paul