cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX generate incomplete code for an LL based STM32L1 project

Posted on September 09, 2017 at 06:39

Update:

 As the below error appeared when I tried to make a Low Layer project for Nucleo L152RE board using STM32CubeMX in generating a code for a Makefile project, and, it was solved by an update to both STM32CubeMX and LL driver, the generated code remains unusable so, I chose a more appropriate title.

Original topic:

- undefined reference to `LL_RCC_GetSystemClocksFreq'

This function is referenced inside LL_I2C_Init function. I am using the last version of STM32CubeMX and I'm writing code for Nucleo L152RE board using Low Layer drivers.

I generated code for using the I2C1 peripheral, and I did a compilation without adding my own code. And it trows the error specified in the title at linker time. I also use the last version of ARM gcc compiler from the gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 archive under Linux Fedora 26. 

I attached the project archive.

#stm32cubemx #i2c #timer #incomplete-code #undeleted-temporary-files #missing-files #beta-quality #nucleo-l152re #linker-error
21 REPLIES 21

Hi

Thanks for replying. My comment relates to the issue that STM32CubeMX, even in the most recent version 5.0.0, still creates projects which don't compile from the beginning because of missing library references.

I had opened a ticket with Sysprogs, the maker of VisualGDB because an empty imported STM32CubeMX project didn't compile and I thought it was an import issue. They analyzed the files provided by me and stated:

---------------

Thanks for providing the 100% repro case.

We have reproduced the problem on our side, however it looks like it's caused by the STM32CubeMX generator: the .gpdsc file produced by it does is missing one definition and several source files.

You can get the imported project to build by defining the USE_FULL_LL_DRIVER macro via VisualGDB Project Properties (or VS Project Properties) and then adding the stm32f3xx_hal_rcc, *rcc_ex and *ll_gpio.c files to the project.

---------------

Since then I add the missing references to every STM32CubeMX generated project using the low layer API before starting with my code.

Best Regards

Michael

OK, I understand.

Could you please describe this issue in a new question with the topic STM32CubeMX as it requires investigation from our STM32CubeMX experts?

Thanks,

Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.