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
|
OBJCOPY = avr-objcopy
|
||||||
AVRDUDE = avrdude
|
AVRDUDE = avrdude
|
||||||
CODE_FORMATTER = tooling/format-code.sh
|
CODE_FORMATTER = tooling/format-code.sh
|
||||||
|
AVRSIZE = avr-size
|
||||||
|
|
||||||
BOARD = atmega2560
|
BOARD = atmega2560
|
||||||
|
|
||||||
@ -62,6 +63,9 @@ AVRDUDEARGS = -p $(BOARD) \
|
|||||||
-V \
|
-V \
|
||||||
-D
|
-D
|
||||||
|
|
||||||
|
AVRSIZEARGS = -C \
|
||||||
|
--mcu=$(BOARD)
|
||||||
|
|
||||||
all: $(ELF) $(TARGET)
|
all: $(ELF) $(TARGET)
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
@ -85,4 +89,7 @@ install:
|
|||||||
format:
|
format:
|
||||||
$(CODE_FORMATTER) $(SRC)
|
$(CODE_FORMATTER) $(SRC)
|
||||||
|
|
||||||
.PHONY: clean install format
|
size:
|
||||||
|
$(AVRSIZE) $(AVRSIZEARGS) $(ELF)
|
||||||
|
|
||||||
|
.PHONY: clean install format size
|
||||||
|
Loading…
Reference in New Issue
Block a user