You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build(esp32s2/s3): drop unconditional -DUSB_VID/USB_PID injection (149-156 redefinition warnings per build) #405
On esp32s2 and esp32s3 builds, fbuild unconditionally injects -DUSB_VID=... and -DUSB_PID=... (and likely USB_MANUFACTURER/USB_PRODUCT) into the compile-flag set. The Arduino framework variant headers also #define these symbols, producing 149-156 redefinition warnings per build.
warning: "USB_VID" redefined
note: this is the location of the previous definition <command-line>
framework-arduinoespressif32/.../variants/lolin_s2_mini/pins_arduino.h:7 (also other S2 variants)
Evidence
esp32s3 audit run: 156 hits
esp32s2 audit run: 149 hits
rgbw (esp32s3 underneath): 39 hits
This is noise that buries real warnings and slows CI log grep / diagnostics workflows.
Proposed fix
Mirror PlatformIO behavior: only inject -DUSB_VID/USB_PID when the user has explicitly set custom values in build_flags or the board JSON, otherwise let the variant pins_arduino.h define them. This requires the ESP32 flag builder (crates/fbuild-build/src/esp32/.../flag_* likely) to detect default-vs-override.
Acceptance: a clean esp32s3 build emits zero "USB_VID" redefined warnings; a user sketch with build_flags = -DUSB_VID=0xDEAD still wins.
Activity
zackees commentedon Jun 4, 2026
Tracked under fbuild meta-audit: #408