Add make size target. This target can be used to print firmware memory usage in AVR format
This commit is contained in:
parent
40c0ac6888
commit
de62693b6d
9
Makefile
9
Makefile
@ -8,6 +8,7 @@ CC = avr-gcc
|
||||
OBJCOPY = avr-objcopy
|
||||
AVRDUDE = avrdude
|
||||
CODE_FORMATTER = tooling/format-code.sh
|
||||
AVRSIZE = avr-size
|
||||
|
||||
BOARD = atmega2560
|
||||
|
||||
@ -62,6 +63,9 @@ AVRDUDEARGS = -p $(BOARD) \
|
||||
-V \
|
||||
-D
|
||||
|
||||
AVRSIZEARGS = -C \
|
||||
--mcu=$(BOARD)
|
||||
|
||||
all: $(ELF) $(TARGET)
|
||||
|
||||
%.o : %.c
|
||||
@ -85,4 +89,7 @@ install:
|
||||
format:
|
||||
$(CODE_FORMATTER) $(SRC)
|
||||
|
||||
.PHONY: clean install format
|
||||
size:
|
||||
$(AVRSIZE) $(AVRSIZEARGS) $(ELF)
|
||||
|
||||
.PHONY: clean install format size
|
||||
|
Loading…
Reference in New Issue
Block a user