diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-09 06:58:44 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-09 06:58:44 +0000 |
commit | bea54255a3217229764cd35aca4387ac76531692 (patch) | |
tree | 29929cf663d983d0364f9830282c634836fa0077 | |
parent | 2bf5a3ae4e9356d80d6434e40e1e864ceb08d734 (diff) |
Add size printouts before and after compilation
git-svn-id: https://svn.openpcd.org:2342/trunk@446 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r-- | openpicc/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openpicc/Makefile b/openpicc/Makefile index f0721c2..927aa22 100644 --- a/openpicc/Makefile +++ b/openpicc/Makefile @@ -120,6 +120,8 @@ ARM_OBJ = $(ARM_SRC:.c=.o) FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o) DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o) +all: old-size openpicc.bin print-size + openpicc.bin : openpicc.elf $(OBJCOPY) openpicc.elf -O binary openpicc.bin @@ -146,10 +148,18 @@ clean : find -name '*.o' -exec rm \{\} \; rm -f openpicc.bin openpicc.elf openpicc.map openpicc.asm config/compile.h rm -rf $(DEPDIR) + rm -f old-size new-size -.PHONY: config/compile.h +.PHONY: config/compile.h print-size old-size all config/compile.h: scripts/mkcompile_h > config/compile.h application/cmd.o: config/compile.h +old-size: + arm-elf-size -B openpicc.elf > old-size || true + +print-size: openpicc.elf + arm-elf-size -B $< > new-size + ((diff -u old-size new-size 2> /dev/null && cat new-size) || true) | egrep "(text|elf)" + -include $(DEPDIR)/*.P |