Can't compile on Linux: stm32h7xx.h: No such file or directory

I have issues running the build_all task on Linux. It fails with the following message:

arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32H750xx -DHSE_VALUE=16000000  -DCORE_CM7 -DSTM32H750IB -DARM_MATH_CM7 -DUSE_FULL_LL_DRIVER -include stm32h7xx.h -I../libDaisy -I../libDaisy/src/ -I../libDaisy/src/sys -I../libDaisy/src/usbd -I../libDaisy/src/usbh -I../libDaisy/Drivers/CMSIS_5/CMSIS/Core/Include/ -I../libDaisy/Drivers/CMSIS-DSP/Include -I../libDaisy/Drivers/CMSIS-Device/ST/STM32H7xx/Include -I../libDaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libDaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../libDaisy/Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../libDaisy/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -I../libDaisy/core/ -I../DaisySP/Source -I../libDaisy/Middlewares/Third_Party/FatFs/src -Os -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -Wno-stringop-overflow -g -ggdb -MMD -MP -MF"build/startup_stm32h750xx.d" -std=gnu11 -Wa,-a,-ad,-alms=build/startup_stm32h750xx.lst ../libDaisy/core/startup_stm32h750xx.c -o build/startup_stm32h750xx.o
cc1: fatal error: stm32h7xx.h: No such file or directory

I followed the install instruction and am not sure how to resolve this. Any hints?

Solved this myself, the path in the makefile was wrong : )

Sorry to bring this up again, but I was mistaken in assuming it now worked. I still get the same error. I am programming using a STLINK V3MINIE and the same physical setup works in Windows so it has to be a software problem.

I already tried to google for the error in question (cc1: fatal error: stm32h7xx.h: No such file or directory) but my searches did not bring up anything at all.

Any ideas?

1 Like

I have the same issue on Mac.

Solved my issue by pulling down the DaisyExamples repo again – I think I did not have all the submodules downloaded previously. While I thought I included the command to recursively pull down the submodules, maybe it somehow didn’t work the first time. In case anyone is having trouble, make sure your pull looks like this:

git clone --recurse-submodules

The --recurse-submodules option is vital.

1 Like