cancel
Showing results for 
Search instead for 
Did you mean: 

I can not create a .elf File because a fatal error: stm3210xx_hal_adc.h, using STM32CubeIDE

Der_Rote
Associate II

Hello,

I need to create an .elf file from a program that I didn't write but has already proven to work. I'm using an STM32L031K6T6 processor and I work with STMCubeIDE. I selected the processor correctly when creating the STM program. The HAL directory is correctly added to the Include path. When I try to debug the project, the error "fatal error: stm3210xx_hal_adc.h" appears seceral times.
If I am not allowed to change the code, what settings can I still investigate which could be causing the error?
Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Show error(s) as displayed and in context.

Error from Debugger, Linker, Compiler?

Compiler, perhaps dump out pre-processor phase.

Check versions of tools, libraries, etc.

>>If I am not allowed to change the code, what settings can I still investigate which could be causing the error?

Perhaps work directly with those who wrote it? Who can change it, and have responsibility for it working properly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
SofLit
ST Employee

Hello,

You're using STM32L031 but you're trying to include the file "stm3210xx_hal_adc.h" which is not available in any driver! you need stm32l0xx_hal_adc.h for your device.

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.

Hello @SofLit ,

I'm very sorry, I misread the error. The correct error is "fatal error: stm32l0xx_hal_adc.h".

You need to provide the all error trace as "fatal error: stm32l0xx_hal_adc.h" doesn't provide any information about the issue.

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.

Show error(s) as displayed and in context.

Error from Debugger, Linker, Compiler?

Compiler, perhaps dump out pre-processor phase.

Check versions of tools, libraries, etc.

>>If I am not allowed to change the code, what settings can I still investigate which could be causing the error?

Perhaps work directly with those who wrote it? Who can change it, and have responsibility for it working properly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Der_Rote
Associate II

There were reasons why I thought it wasn't possible to contact the creator, but it was possible and he was able to help me. Thanks to all for your help! <Perhaps work directly with those who wrote it?> @Tesla DeLorean You've got it straight to the point :)