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
52 stars 14 forks source link

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

Open Vinzenz82 opened 4 months ago

Vinzenz82 commented 4 months 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 4 months ago

ST Internal Reference: 187607

TOUNSTM commented 4 months ago

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