From 79d9fcbd5f4c31f02430c6b1ea1f092f5c1668b3 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Wed, 12 May 2021 16:29:48 +0300 Subject: [PATCH] Disassemble elf file after build --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index da48eff..ee24295 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,12 @@ set_target_properties(firmware PROPERTIES CXX_STANDARD 14) # generate firmware.bin file objcopy(firmware "ihex" ".hex") +add_custom_command( + TARGET firmware + POST_BUILD + COMMAND avr-objdump ARGS -CSd firmware > firmware.txt +) + # generate linker map file target_link_options(firmware PUBLIC -Wl,-Map=firmware.map)