cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX F4 LL GPDSC code generation issues

parsec
Associate III
Posted on December 14, 2017 at 09:26

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.

1 REPLY 1
Houda GHABRI
ST Employee
Posted on June 01, 2018 at 12:26

Hi

Vazic.Relko

,

Thanks for your feedback.

This issue will be solved in a future cubeMX release but unfortunately I don't have the exactdelivery date for the moment.I will keep you informed for the updates.

Regards,

Houda