2024-03-16 06:13 AM
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.
Solved! Go to Solution.
2024-03-16 08:20 AM
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.
2024-03-16 06:24 AM
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.
2024-03-16 06:44 AM
Hello @SofLit ,
I'm very sorry, I misread the error. The correct error is "fatal error: stm32l0xx_hal_adc.h".
2024-03-16 07:12 AM
You need to provide the all error trace as "fatal error: stm32l0xx_hal_adc.h" doesn't provide any information about the issue.
2024-03-16 08:20 AM
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.
2024-03-16 09:58 AM
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 :)