Skip to content

Dash in defines on command lines may disturb GCC #1770

Description

@jmdubois

Sloeber last available plugin from Eclipse MarketPlace passes -DARDUINO_VARIANT=ttgo-t1 without shell quoting, so the compiler sees bare tokens. For example, esp32/3.3.10/cores/esp32/chip-debug-report.cpp is disturbed. Workaround :
// Added at top of file:
#define _STRINGIFY(x) #x
#define _TOSTRING(x) _STRINGIFY(x)
// Changed the three printf calls to:
chip_report_printf(" Compile Host OS : %s\n", _TOSTRING(ARDUINO_HOST_OS));
chip_report_printf(" Arduino Variant : %s\n", _TOSTRING(ARDUINO_VARIANT));
chip_report_printf(" Arduino FQBN : %s\n", _TOSTRING(ARDUINO_FQBN));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions