From f412ba7a76994b4915f0935298c04be0ed32e4fe Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Mon, 9 Dec 2024 12:49:55 -0800 Subject: [PATCH] Add cross-reference table to `.elf.map` This allows for more in-depth understanding of what code is causing usage of what other code, helping to track memory and code usage of final project. --- .gitignore | 3 +-- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a2ca548..ed6daef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ build/** -build_rp2040/** -build_rp2350/** +build_*/** .vscode/** .env diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c0e3e41..c486f66 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -515,7 +515,7 @@ foreach(revision ${revisions}) #pico_set_linker_script(${revision} ${CMAKE_CURRENT_LIST_DIR}/pirate/memmap_default.ld) endforeach() -string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--print-memory-usage") +string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--cref,--print-memory-usage") # by default this project uses LGPL3 libraries, if you do not want to comply