diff --git a/Makefile b/Makefile index 5462f3b..39369ed 100644 --- a/Makefile +++ b/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