From 925dbe1db4ec4da474fbdc49d4119f93f7e2a7cc 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 2ca52a2..31ebf13 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)