System Workbench for STM32

SystemWorkBench Includes problem on Linux - OK on Windows (From a CubeMX project)

Generating exactly the same code on Windows (CubeMX -> AC6) works but not on Linux, the same process results in many complains from the compiler
about many ‘unknown type name xxxx’ !
Is the problem in CubeMX ? Seems not as the includes defining the names types *are well* in the code but seem to be skipped/not seen by Eclipse/gcc ?
stm32h7xx_hal_mdam.h cannot compile because of:

HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);

~~<span style="color”><span style="color”><span style="color”><span style="color”><span style="color”> In file included from /home/jea/ws_stm32/H7_UART6/Inc/stm32h7xx_hal_conf.h”>309:0,

from /home/jea/ws_stm32/H7_UART6/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h:48,
from /home/jea/ws_stm32/H7_UART6/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:180,
from /home/jea/ws_stm32/H7_UART6/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:48,
from /home/jea/ws_stm32/H7_UART6/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h:47,
from ../Src/uartmessage.c:3:
/home/jea/ws_stm32/H7_UART6/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:231:1: error: unknown type name ‘HAL_LockTypeDef’
HAL_LockTypeDef Lock;

/home/jea/ws_stm32/H7_UART6/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h:631:1: error: unknown type name ‘HAL_StatusTypeDef’
HAL_StatusTypeDef HAL_MDMA_Init(MDMA_HandleTypeDef *hmdma);

BUT “HAL_LockTypeDef Lock” is defined in “stm32h7xx_hal_def.h” which is well included at the beginning of “stm32h7xx_hal_mdam.h” and all the include
access paths are there in the project !?

So, gcc is going crazy ?


I use CubeMX generated projects on Linux with SystemWorkbench, they work fine.

From memory there are two ways to include the firmware (as references or copied into your project - just checked in CubeMX Project Menu, Project Settings, Code Generator tab)... I use the copy method and that seems to work ok.