STM32Cube MCU Full FW Package for the STM32WL series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on boards provided by ST (Nucleo boards)
Other
99
stars
52
forks
source link
Maximum number of tasks in sequencer not triggering an error #52
Bug:
Preprocessor error is not triggered if the CFG_SEQ_Task_NBR is > 32 although there is a code to protect it
#if UTIL_SEQ_CONF_TASK_NBR > 32
#error "UTIL_SEQ_CONF_PRIO_NBR must be less of equal then 32"
#endif
It happens because the #define UTIL_SEQ_CONF_TASK_NBR CFG_SEQ_Task_NBR is evaluated by preprocessor to zero. It doesn't know the value of CFG_SEQ_Task_NBR at this stage. Try to add -Wundef flag and see the compiler output
Next when there is a preprocessor macro #if UTIL_SEQ_CONF_TASK_NBR > 32 we copmare 0 > 32
Also there is a typo in the error message: UTIL_SEQ_CONF_TASK_NBR must be less of equal then 32
Setup:
Bug: Preprocessor error is not triggered if the
CFG_SEQ_Task_NBR
is > 32 although there is a code to protect itIt happens because the
#define UTIL_SEQ_CONF_TASK_NBR CFG_SEQ_Task_NBR
is evaluated by preprocessor to zero. It doesn't know the value ofCFG_SEQ_Task_NBR
at this stage. Try to add-Wundef
flag and see the compiler outputNext when there is a preprocessor macro
#if UTIL_SEQ_CONF_TASK_NBR > 32
we copmare0 > 32
Also there is a typo in the error message: UTIL_SEQ_CONF_TASK_NBR must be less of equal then 32