From 9d350621fc432a818b833c037e15e60941b62a07 Mon Sep 17 00:00:00 2001 From: Ashley Strahle Date: Tue, 23 Jun 2026 23:44:40 +0000 Subject: [PATCH] Use os.remove instead of rename for DCD deletion --- extra_script.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extra_script.py b/extra_script.py index acb79be..f8d29f8 100644 --- a/extra_script.py +++ b/extra_script.py @@ -15,11 +15,8 @@ lib_path = os.path.join( ) dcd_path = os.path.join(lib_path, "portable", "synopsys", "dwc2", "dcd_dwc2.c") -backup = dcd_path + ".bak" - if os.path.exists(dcd_path): - # Rename .c -> .bak so the build system doesn't compile it - os.rename(dcd_path, backup) - print("[extra_script] Renamed dcd_dwc2.c -> dcd_dwc2.c.bak (using ESP32 core DCD + project stubs)") + os.remove(dcd_path) + print("[extra_script] Removed dcd_dwc2.c (using ESP32 core DCD + project stubs)") else: print("[extra_script] dcd_dwc2.c not found at:", dcd_path)