From bb5f992ccb7feaee7146f192879bad4acdf100dc Mon Sep 17 00:00:00 2001 From: Ashley Strahle Date: Tue, 23 Jun 2026 23:26:02 +0000 Subject: [PATCH] Revert to --allow-multiple-definition: Adafruit v3.7.7 needs its own TinyUSB core files (newer API than lib in esp32 core) --- extra_script.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/extra_script.py b/extra_script.py index 8baa197..fda0754 100644 --- a/extra_script.py +++ b/extra_script.py @@ -1,21 +1,3 @@ Import("env") -import os -lib_path = os.path.join( - env.subst("$PROJECT_DIR"), - ".pio", "libdeps", env.subst("$PIOENV"), - "Adafruit TinyUSB Library", "src" -) - -conflicting = [ - "tusb.c", - "common/tusb_fifo.c", - "device/usbd.c", - "device/usbd_control.c", -] - -for f in conflicting: - path = os.path.join(lib_path, f) - if os.path.exists(path): - os.remove(path) - print(f"[extra_script] Removed {f} (provided by ESP32 core libarduino_tinyusb.a)") +env.Append(LINKFLAGS=["-Wl,--allow-multiple-definition"])