Skip to main content
CTapp.1
Senior III
July 15, 2025
Question

stm32g4xx_ll_rcc.c is not being added when RCC is switched from HAL to LL

  • July 15, 2025
  • 2 replies
  • 377 views

I've got a project that's being developed using STM32CubeIDE  V 1.18.1

I've switched from using HAL to LL for the RCC, but the stm32g4xx_ll_rcc.c file is not being added to the project (though stm32g4xx_ll_rcc.h is added) - which means that calls to LL_RCC_DeInit() result in a link failure.

2 replies

Ghofrane GSOURI
Technical Moderator
July 15, 2025

Hello @CTapp.1 

Could you please provide your IOC in order to push further the investigation.

THX

Ghofrane

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.
CTapp.1
CTapp.1Author
Senior III
July 15, 2025

Hi @Ghofrane GSOURI,

Attached, as requested.

All posts are made in a personal capacityMISRA C++ ChairMISRA C WG MemberDirector The MISRA Consortium Limited (TMCL)
Ghofrane GSOURI
Technical Moderator
July 15, 2025

Hello @CTapp.1 

Your cooperation is greatly appreciated.

I am currently investigating this and will get back to you as soon as possible.

THX

Ghofrane

 

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.
CTapp.1
CTapp.1Author
Senior III
July 16, 2025

I've copied the file in from another project to get me going - though I'll have to keep restoring it if I regenerate as it gets removed ;)

All posts are made in a personal capacityMISRA C++ ChairMISRA C WG MemberDirector The MISRA Consortium Limited (TMCL)
Ghofrane GSOURI
Technical Moderator
July 16, 2025

Hello @CTapp.1 

That’s a great workaround :) 

Rather than copying your file directly into the CubeMX-generated folder, place it in a separate directory within your project. Then, add this directory and its files to your project’s build settings (including the include paths and source files). By doing so, your files will remain intact and won’t be deleted when you regenerate the code.

THX

Ghofrane

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.