summaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2013-10-09 00:38:18 +0200
committercpldcpu <cpldcpu@gmail.com>2013-10-09 00:38:18 +0200
commitc1d9b4aa62b959153139c923950e8ad86d9eb30c (patch)
tree9cc92449b660ec6b9fa09de9c35eae2dacdf496e /firmware/Makefile
parent16c1092c688200cba1231dbfebbac52b4d178c03 (diff)
downloadmicronucleus-c1d9b4aa62b959153139c923950e8ad86d9eb30c.tar.gz
micronucleus-c1d9b4aa62b959153139c923950e8ad86d9eb30c.tar.bz2
micronucleus-c1d9b4aa62b959153139c923950e8ad86d9eb30c.zip
Enabled garbage collection and better disassembly
Should have no impact on code
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 8dfba5d..2d6f357 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -148,11 +148,12 @@ CC = avr-gcc
# Options:
DEFINES = -DBOOTLOADER_ADDRESS=0x$(BOOTLOADER_ADDRESS) #-DDEBUG_LEVEL=2
# Remove the -fno-* options when you use gcc 3, it does not understand them
-CFLAGS = -Wall -Os -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-functions -I. -Ilibs-device -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) $(DEFINES)
+#
+CFLAGS = -g2 -ffunction-sections -fdata-sections -fpack-struct -Wall -Os -fno-inline-small-functions -fno-move-loop-invariants -fno-tree-scev-cprop -I. -Ilibs-device -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) $(DEFINES)
LDFLAGS = -Wl,--relax,--gc-sections -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS),-Map=main.map
OBJECTS = usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
-OBJECTS += libs-device/osccal.o
+OBJECTS += libs-device/osccal.o
# symbolic targets:
all: main.hex
@@ -201,7 +202,7 @@ main.hex: main.bin
avr-size main.hex
disasm: main.bin
- avr-objdump -d main.bin
+ avr-objdump -d -S main.bin >main.lss
cpp:
$(CC) $(CFLAGS) -E main.c