diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-08-31 16:02:40 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-08-31 16:02:40 +0200 |
commit | 7eb9f1650c97d7286d817cbbd08a47e1dbe1ac01 (patch) | |
tree | ed77008cfc42b006becf916d7065b441e7c70ab6 | |
parent | 7d37ab532b2f144a05a4ce865dede2bcfdac368b (diff) |
arduino-nano: Add "make size" target
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index b1b76f1..6768c35 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -156,6 +156,11 @@ arch_clean: monitor: ${QUIET}screen ${SERIAL_PORT} ${uart_baud} +size: build/system.elf + ${QUIET}avr-size --format=avr --mcu=atmega328p build/system.elf | fgrep Program | perl -nE 'if (m{(\d+) bytes \(([0-9.]+%)}) { print("$$1;$$2;") }' + ${QUIET}avr-size --format=avr --mcu=atmega328p build/system.elf | fgrep Data | perl -nE 'if (m{(\d+) bytes \(([0-9.]+%)}) { print("$$1;$$2;") }' + ${QUIET}echo + arch_help: @echo "arduino-nano specific flags:" @echo " SERIAL_PORT = ${SERIAL_PORT}" @@ -168,4 +173,4 @@ arch_info: @echo "Counter Overflow: 65536/255" @echo "Monitor: ${SERIAL_PORT} ${uart_baud}" -.PHONY: arch_clean arch_help arch_info monitor program +.PHONY: arch_clean arch_help arch_info monitor program size |