diff --git a/CMakeLists.txt b/CMakeLists.txt index b4d12bb8c87418..2a7b3efe1e5d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1704,7 +1704,7 @@ endif() if(CONFIG_OUTPUT_DISASSEMBLY) if(CONFIG_OUTPUT_DISASSEMBLE_ALL) set(disassembly_type "$") - else() + elseif (CONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE) set(disassembly_type "$") endif() list(APPEND diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 5375245ced0533..5bcddad5c48c39 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -567,6 +567,17 @@ config OUTPUT_DISASSEMBLE_ALL The .lst file will contain complete disassembly of the firmware not just those expected to contain instructions including zeros +config OUTPUT_DISASSEMBLY_WITH_SOURCE + bool "Include source code in output disassembly file" + default y + depends on OUTPUT_DISASSEMBLY && !OUTPUT_DISASSEMBLE_ALL + help + The .lst file will also contain the source code. Having + control over this can be useful for reproducible builds + since it can be used to remove one of the elements of + the .lst file that can vary across platforms because + of reasons such as having ".." include paths. + config OUTPUT_PRINT_MEMORY_USAGE bool "Print memory usage to stdout" default y