Skip to content

[BUG] Parsing U8glib-HAL.h may fail under specific conditions #93

Open

Description

@Maoweicao

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

Activity

  1. github-actions commented on Apr 5, 2026

    @github-actions

    Thank your for submiting, please be sure you followed template or your issue may be dismissed.

  2. luc-github commented on Apr 5, 2026

    @luc-github
    Owner

    what version of ESP3DLIB are you using ?

    can you share the error message :

    I found that U8glib-HAL.h may fail to parse in espcom.cpp under specific circumstances, even if the dependency already exists.

    because it is weird - what do you mean by : under specific circumstances, ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions