From: Kedar Sovani Date: Mon, 19 Feb 2018 11:54:12 +0000 (+0530) Subject: Create a make size-symbols target for fine grained footprint X-Git-Tag: v3.1-beta1~233^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=106117078770b07e667b9f62bf4cc2c4ce982b04;p=esp-idf Create a make size-symbols target for fine grained footprint --- diff --git a/make/project.mk b/make/project.mk index 31f72bc5fa..4f44dcbf19 100644 --- a/make/project.mk +++ b/make/project.mk @@ -10,7 +10,7 @@ # where this file is located. # -.PHONY: build-components menuconfig defconfig all build clean all_binaries check-submodules size size-components size-files list-components +.PHONY: build-components menuconfig defconfig all build clean all_binaries check-submodules size size-components size-files size-symbols list-components MAKECMDGOALS ?= all all: all_binaries @@ -32,6 +32,7 @@ help: @echo "make clean - Remove all build output" @echo "make size - Display the static memory footprint of the app" @echo "make size-components, size-files - Finer-grained memory footprints" + @echo "make size-symbols - Per symbol memory footprint. Requires COMPONENT=" @echo "make erase_flash - Erase entire flash contents" @echo "make monitor - Run idf_monitor tool to monitor serial output from app" @echo "make simple_monitor - Monitor serial output on terminal console" @@ -463,6 +464,13 @@ size-files: $(APP_ELF) size-components: $(APP_ELF) $(PYTHON) $(IDF_PATH)/tools/idf_size.py --archives $(APP_MAP) +size-symbols: $(APP_ELF) +ifndef COMPONENT + $(error "ERROR: Please enter the component to look symbols for, e.g. COMPONENT=heap") +else + $(PYTHON) $(IDF_PATH)/tools/idf_size.py --archive_details lib$(COMPONENT).a $(APP_MAP) +endif + # NB: this ordering is deliberate (app-clean & bootloader-clean before # _config-clean), so config remains valid during all component clean # targets