From a7b596caac9bf27dce93e9e537b2bb1d94054e33 Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Wed, 26 Jan 2011 12:57:54 +0100 Subject: [PATCH] configured avr-gcc for dead code removal --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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