[Build] Process copy_files in post_esp32 script

This commit is contained in:
Ton Huisman
2025-03-08 22:42:54 +01:00
parent 27736ea351
commit dd58459ae3
2 changed files with 3 additions and 8 deletions
-8
View File
@@ -3,11 +3,6 @@ import enum
import subprocess
import shutil
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pio'))
from copy_files import bin_elf_copy
class CannotArchive(Exception):
pass
@@ -25,9 +20,6 @@ def cmd(*, env, pio_can_fail):
if not pio_can_fail:
raise
# Explicitly copy the files, as it seems to be 'forgotten' sometimes
bin_elf_copy()
output = "build_output"
dirs = [os.path.join(output, "bin")]
+3
View File
@@ -22,6 +22,7 @@ platform = env.PioPlatform()
import sys
from os.path import join
from copy_files import bin_elf_copy
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
import esptool
@@ -68,5 +69,7 @@ def esp32_create_combined_bin(source, target, env):
esptool.main(cmd)
bin_elf_copy()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin)