From 17f3e9fab748226f092e5c45a70be4d4619b7e7b Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Thu, 6 Jan 2022 20:51:40 +0100 Subject: [PATCH] Update obj-dump.py to support more boards and adding flag to demangle. --- pio-tools/obj-dump.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pio-tools/obj-dump.py b/pio-tools/obj-dump.py index 91bc3de58..74edd3958 100644 --- a/pio-tools/obj-dump.py +++ b/pio-tools/obj-dump.py @@ -3,7 +3,16 @@ Import('env') def obj_dump_after_elf(source, target, env): + platform = env.PioPlatform() + board = env.BoardConfig() + mcu = board.get("build.mcu", "esp32") + print("Create firmware.asm") - env.Execute("xtensa-lx106-elf-objdump "+ "-D " + str(target[0]) + " > "+ "${PROGNAME}.asm") - + if mcu == "esp8266": + env.Execute("xtensa-lx106-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm") + if mcu == "esp32": + env.Execute("xtensa-esp32-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm") + if mcu == "esp32c3": + env.Execute("riscv32-esp-elf-objdump "+ "-D -C " + str(target[0]) + " > "+ "$BUILD_DIR/${PROGNAME}.asm") + env.AddPostAction("$BUILD_DIR/${PROGNAME}.elf", [obj_dump_after_elf])