STMicroelectronics / STM32CubeH5

Full firmware package for STM32H5 series containing CMSIS, HAL-LL, BSP drivers, MW libraries plus a set of projects.
https://www.st.com/en/embedded-software/stm32cubeh5.html
Other
47 stars 11 forks source link

Compilation of cmsis_os2.c fails if USE_MEMORY_POOL_ALLOCATION is defined. #15

Open Vinzenz82 opened 1 month ago

Vinzenz82 commented 1 month ago

Describe the set-up STM32CubeIDE Version: 1.15.1

Describe the bug

#ifdef USE_DYNAMIC_MEMORY_ALLOCATION
  unused_memory = (CHAR *)_tx_initialize_unused_memory;
#elif  USE_MEMORY_POOL_ALLOCATION
  static CHAR freememStack[RTOS2_BYTE_POOL_STACK_SIZE + RTOS2_INTERNAL_BYTE_POOL_SIZE];
  static CHAR freememHeap[RTOS2_BYTE_POOL_HEAP_SIZE + RTOS2_INTERNAL_BYTE_POOL_SIZE];
  unused_memory_Stack = (CHAR *)freememStack;
  unused_memory_Heap = (CHAR *)freememHeap;
#endif

Compiler Output: cmsis_os2.c:270:34: error: #elif with no expression

How To Reproduce define USE_MEMORY_POOL_ALLOCATION instead of USE_DYNAMIC_MEMORY_ALLOCATION

The modules that you suspect to be the cause of the problem: stm32h5/Middlewares/ST/cmsis_rtos_threadx/cmsis_os2.c

TOUNSTM commented 1 month ago

ST Internal Reference: 187607

TOUNSTM commented 1 month ago

See Also https://github.com/STMicroelectronics/stm32_mw_cmsis_rtos_tx/issues/2