I am using Marlin 2.0.9.10 with PlatformIO 6.1.15 to compile firmware for an ESP32 board (MagicMaker Sparrow).
I found that U8glib-HAL.h may fail to parse in espcom.cpp under specific circumstances, even if the dependency already exists.
Original code:
#if HAS_MARLINUI_U8GLIB
#include <U8glib-HAL.h>
#endif
After modifying to the following code, the compilation error disappears and the firmware works normally:
#if HAS_MARLINUI_U8GLIB
#if __has_include (<U8glib-HAL.h>)
#include <U8glib-HAL.h>
#endif
#endif
I am using Marlin 2.0.9.10 with PlatformIO 6.1.15 to compile firmware for an ESP32 board (MagicMaker Sparrow).
I found that U8glib-HAL.h may fail to parse in espcom.cpp under specific circumstances, even if the dependency already exists.
Original code:
After modifying to the following code, the compilation error disappears and the firmware works normally: