cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit declaration of HAL function after changing from HAL to LL

stmrsp
Associate

This is a minimal configuration/steps to reproduce, the same issue we have in our project:

- start my project from ST board, click "access to board selector"
- click "Board Selector" tab
- check the STM32H7 in "MCU / MPU Series"
- select the board "STM32H735G-DK"
- click "Start Project" button
- click Yes to pop-up window "For this Cortex-M7 device... apply default configuration?"
- in "Pinout & Configuration / Categories" set "Mode Asynchronous" for UART9
- click on tab "Clock Configuration" and press yes to solve clock issues
- save the project somewhere
- go to "Project Manager" tab and set "Toolchain STMCuebIDE"
- generate the code, open the project with STM32CubeIDE, build the project (no problems)
- in STM32CubeMx, go to "Advanced Settings" and set "LL" instead "HAL" to the three generated components (RCC, GPIO, UART)
- generate the code, open the project with STM32CubeIDE, build the project
--> build error

../Core/Src/main.c: In function 'MX_UART9_Init':
../Core/Src/main.c:178:3: error: implicit declaration of function '__HAL_RCC_UART9_CLK_ENABLE' [-Wimplicit-function-declaration]
178 | __HAL_RCC_UART9_CLK_ENABLE();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Core/Src/subdir.mk:31: Core/Src/main.o] Error 1
make: *** Waiting for unfinished jobs....


Question: do we need some extra configuration? are we doing something wrong here?

7 REPLIES 7
Andrew Neil
Super User

@stmrsp wrote:

- in STM32CubeMx, go to "Advanced Settings" and set "LL" instead "HAL" to the three generated components (RCC, GPIO, UART)


I'm not sure that's intended to allow changing an existing Project ?

 

If you do a new Project from scratch with LL instead of HAL - does that work ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
MM..1
Chief III

I use this switching daily, and no problem here, but require leave one HAL or manual include hal...

__HAL func is helpers

Pavel A.
Super User

Undefined __HAL... macros can be a red flag. Need to find why it is undefined. Some low level ( __ ) things are conditional on specific MCU models. That's they are defined for one model but undefined for other.

 

Project with LL drivers from scratch does not help, I get the same error

Mahmoud Ben Romdhane
ST Employee

Hello @stmrsp 

Let me thank you for posting and welcome to the ST Community.

I am currently checking this behavior, and I will get back to you ASAP.

Thanks.

Mahmoud

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.

Andrew Neil
Super User

Is it just this one error, or also others?

 

It looks like you have your project configured to handle warnings as errors - this should be just a warning, not an error.

There should be a corresponding Linker error if the definition is really missing ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Mahmoud Ben Romdhane
ST Employee

Hello @stmrsp 

Let me thank you for bringing this issue to our attention.

An internal ticket has been raised to the development team (Ticket Number: CDM0063042)

I will let you know as soon as the problem is solved.

Thanks.

Mahmoud

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.