Skip to main content
Explorer
March 16, 2024
Solved

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

  • March 16, 2024
  • 3 replies
  • 2059 views

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.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    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.

    3 replies

    Technical Moderator
    March 16, 2024

    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.

    Der_RoteAuthor
    Explorer
    March 16, 2024

    Hello @mƎALLEm ,

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

    Technical Moderator
    March 16, 2024

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

    Graduate II
    March 16, 2024

    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.

    Der_RoteAuthor
    Explorer
    March 16, 2024

    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 :)