cancel
Showing results for 
Search instead for 
Did you mean: 

Can't include custom source file

Funnypinky
Associate II

Hi,

I wrote my own source file. It is located in the Core/Src directory. I have also entered it accordingly in cmakelists.txt.

my cmakelists.txtmy cmakelists.txt

Now I get an error saying that the include files from the Drivers directory are missing.

Bildschirmfoto vom 2026-03-02 09-45-19.png

If I remove my entry, I no longer get the error. But then I can't use my customs. Is there a sample cmakelists.txt that includes customs?

Thank you,

Funnypinky

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

If it's like other families, you should only include the top-level "stm32wlxx_hal.h", and not individual HAL files.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

5 REPLIES 5
Nawres GHARBI
ST Employee

hi @Funnypinky 

for me seems an include issue, how did you manage the includes in your custom file please ? 

Hi @Nawres GHARBI ,

i include the 

    stm32wlxx_hal_def.h
 
think you i must include the another files?
TDK
Super User

If it's like other families, you should only include the top-level "stm32wlxx_hal.h", and not individual HAL files.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you, was a little mistake, but a big search.

t_j_l
Associate III

You should modify it to Core/Src/ina226/ina226.c