Fix crash/reboot: remove conflicting TinyUSB core sources from Adafruit lib instead of allow-multiple-definition
This commit is contained in:
+19
-1
@@ -1,3 +1,21 @@
|
||||
Import("env")
|
||||
import os
|
||||
|
||||
env.Append(LINKFLAGS=["-Wl,--allow-multiple-definition"])
|
||||
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)")
|
||||
|
||||
Reference in New Issue
Block a user