AnsweredAssumed Answered

CubeMX F4 LL GPDSC code generation issues

Question asked by parsec67 on Dec 14, 2017

Hi,

 

I've run into some problems when generating and then importing a GPDSC project when using LL drivers only.

 

Environment: Visual Studio 2017 + VisualGDB (includes STM32CubeMX GPDSC importer)

 

STM32CubeMX V4.23

STM32CubeF4 V1.18

 

My CubeMX Project settings:

Project tab->Toolchain / IDE: GPDSC

Code generator tab->STM32Cube Firmware Library Package: Copy only the necessary library files

Advanced settings tab->Driver Selector: RCC/DMA/TIM(1+2)/GPIO: LL

 

After generating code there are some files that are referenced in the gpdsc that are not copied to the project folders:

1. Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h and .c

2. Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h

 

Additionally, USE_FULL_LL_DRIVER macro isn't mentioned anywhere in the generated gpdsc but is required for the project to build. For example, without it LL_TIM_InitTypeDef and a bunch of other typedefs in stm32f4xx_ll_tim.h  will be undefined but I have explicitly configured all drivers to be LL so this shouldn't be the case.

 

The #2 file, stm32f4xx_ll_dmamux.h, doesn't exist in the CubeMX repository so no mystery why it isn't copied. But why is it referenced at all?

 

Attached zip file contains the CubeMX generated code and gpdsc file.

 

For VS2017+VisualGDB specifically the workaround was to manually add Cube repo to include directories, manually copy stm32f4xx_hal.c/h from repo to referenced path, remove the reference to stm32f4xx_ll_dmamux.h and finally add USE_FULL_LL_DRIVER to preprocessor macros.

 

An alternative fix is to change Code generator tab->STM32Cube Firmware Library Package to "Copy all used libraries..." option in which case the only additional

step after importing is to add USE_FULL_LL_DRIVER to preprocessor macros.

Attachments

Outcomes