cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX LL Driver Issues

Posted on July 25, 2017 at 11:08

I found two issues with the latest (and updated) STM32CubeMX when generating a Makefile project for STM32F334 Nucleo64 board.

1. I selected only the LL drivers but the Makefile had the 'USE_HAL_DRIVER' definition, so the project wasn't compiling (because there was no HAL driver files in the project as I have selected 'Copy only the necessary library files...' in the settings)

2. The SystemClock_Config function had this line which was giving an error because RCC_LSEDRIVE_LOW is a HAL definition:

LL_RCC_LSE_SetDriveCapability(RCC_LSEDRIVE_LOW);

I had to change it to:

LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);

Thanks!

#ll #stm32cubemx
4 REPLIES 4
Khouloud GARSI
Lead II
Posted on July 28, 2017 at 17:02

Hi

sweden

‌,

For further investigation, could you please share you 'ioc' file.

Thanks .

Khouloud.

Posted on July 31, 2017 at 10:28

Yes sure. Generate the code using the attached 'ioc' file then:

First try of make:

In file included from Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_ll_bus.h:62:0,

from Inc/main.h:43,

from Src/main.c:39:

Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:225:28: fatal error: stm32f3xx_hal.h: No such file or directory

#include 'stm32f3xx_hal.h'

^

compilation terminated.

Fix it by removing the USE_HAL_DRIVER from the Makefile.

Second try of make:

Src/main.c: In function 'SystemClock_Config':

Src/main.c:163:33: error: 'RCC_LSEDRIVE_LOW' undeclared (first use in this function)

LL_RCC_LSE_SetDriveCapability(RCC_LSEDRIVE_LOW);

^

Src/main.c:163:33: note: each undeclared identifier is reported only once for each function it appears in

Makefile:161: recipe for target 'build/main.o' failed

make: *** [build/main.o] Error 1

Fix it by changing RCC_LSEDRIVE_LOW to LL_RCC_LSEDRIVE_LOW.

________________

Attachments :

ll-bugs.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyXP&d=%2Fa%2F0X0000000b9E%2FfWvUtk_S9kXUdENUofpudghO7uDUJOyl8gEREONm7OY&asPdf=false
Posted on July 31, 2017 at 17:53

Hi

sweden

‌,

The highlighted points arereported to our CubeMX team and will be fixed on next releases.

Thanks for bringing this to our attention and for your contribution to the enhancement of our STM32 resources.

Khouloud.

Sirma Siang
ST Employee
Posted on October 17, 2017 at 17:58

Hello

sweden

,

I would like to thank you for your feedback.

This will be corrected in CubeMX4.0.

This version will be available, for download, in the coming days.

Kind regards

Sirma