configured avr-gcc for dead code removal
This commit is contained in:
parent
35f499c00c
commit
a7b596caac
4
Makefile
4
Makefile
@ -38,7 +38,7 @@ FUSES = -U hfuse:w:0xd2:m -U lfuse:w:0xff:m
|
||||
# Tune the lines below only if you know what you are doing:
|
||||
|
||||
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10 -F
|
||||
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I.
|
||||
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I. -ffunction-sections
|
||||
|
||||
# symbolic targets:
|
||||
all: grbl.hex
|
||||
@ -74,7 +74,7 @@ clean:
|
||||
|
||||
# file targets:
|
||||
main.elf: $(OBJECTS)
|
||||
$(COMPILE) -o main.elf $(OBJECTS) -lm
|
||||
$(COMPILE) -o main.elf $(OBJECTS) -lm -Wl,--gc-sections
|
||||
|
||||
grbl.hex: main.elf
|
||||
rm -f grbl.hex
|
||||
|
Loading…
Reference in New Issue
Block a user