How to fix PlatformIO fatal error: ../Fonts/fonts.h: No such file or directory
Problem:
You are trying to compile a PlatformIO application using the BSP_DISCO_F429ZI library, but you see an error message like
platformio-error.txt
In file included from .pio\libdeps\disco_f429zi\BSP_DISCO_F429ZI_ID2208\Drivers\BSP\STM32F429I-Discovery\stm32f429i_discovery_lcd.c:75:0:
.pio\libdeps\disco_f429zi\BSP_DISCO_F429ZI_ID2208\Drivers\BSP\STM32F429I-Discovery\stm32f429i_discovery_lcd.h:49:10: fatal error: ../Fonts/fonts.h: No such file or directory
#include "../Fonts/fonts.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
Solution
The BSP_DISCO_F429ZI package includes fonts.h
from the wrong directory. Replace
fix-include.c
#include "../Fonts/fonts.h"
by
fixed-include.c
#include "Utilities/Fonts/fonts.h"
in order to fix the issue. You might need to do that multiple times (in multiple files) in order to fix your build.
Check out similar posts by category:
C/C++, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow