Use correct object copy for TxtToBin (#714)

* Use correct objectcopy binaries and corresponding flags for ESP32S2 and ESP32C3
This commit is contained in:
Maximilian Gerhardt
2022-04-18 16:27:17 +02:00
committed by GitHub
parent d342bced2d
commit ed65206ab0
+6 -3
View File
@@ -102,19 +102,22 @@ def transform_to_asm(target, source, env):
return files, source
mcu = board.get("build.mcu", "esp32")
env.Append(
BUILDERS=dict(
TxtToBin=Builder(
action=env.VerboseAction(
" ".join(
[
"xtensa-esp32-elf-objcopy",
"riscv32-esp-elf-objcopy"
if mcu == "esp32c3"
else "xtensa-%s-elf-objcopy" % mcu,
"--input-target",
"binary",
"--output-target",
"elf32-xtensa-le",
"elf32-littleriscv" if mcu == "esp32c3" else "elf32-xtensa-le",
"--binary-architecture",
"xtensa",
"riscv" if mcu == "esp32c3" else "xtensa",
"--rename-section",
".data=.rodata.embedded",
"$SOURCE",