From 8c7c1fe2867f00509a3912d75deff11cfb7d03d8 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 14 Nov 2016 01:24:29 -0800 Subject: [PATCH] Add a helper to calculate the size of every function in the firmware --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index b468ecd7..89b47e5b 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ ARDUINO_BUILDER_PATH=$(ARDUINO_PATH)/arduino-builder AVRDUDE_PATH=$(ARDUINO_TOOLS_PATH)/avr/bin/avrdude AVRDUDE_CONF_PATH=$(ARDUINO_TOOLS_PATH)/avr/etc/avrdude.conf AVR_SIZE_PATH=$(ARDUINO_TOOLS_PATH)/avr/bin/avr-size +AVR_NM_PATH=$(ARDUINO_TOOLS_PATH)/avr/bin/avr-nm @@ -111,6 +112,9 @@ compile: dirs size: compile $(AVR_SIZE_PATH) -C --mcu=$(MCU) $(ELF_FILE_PATH) +size-map: compile + $(AVR_NM_PATH) --size-sort -C -r $(ELF_FILE_PATH) + hex-with-bootloader: compile @cat $(HEX_FILE_PATH) | awk '/^:00000001FF/ == 0' > $(HEX_FILE_WITH_BOOTLOADER_PATH)