summaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2013-12-06 15:46:47 +0100
committercpldcpu <cpldcpu@gmail.com>2013-12-06 15:46:47 +0100
commit5eec4f6815221e78c06cc132df258f38d5b46cd8 (patch)
tree6d889eb28478fce751f75ec96edfd4f2b666d840 /firmware/Makefile
parent598ca1ed69747777b2df560f37529eb242b23c43 (diff)
downloadmicronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.tar.gz
micronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.tar.bz2
micronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.zip
custom crt, remove tiny85flashinit, UNTESTED
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 95a48e7..0905d0a 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -24,7 +24,7 @@ LOCKOPT = -U lock:w:0x2f:m
# - for the size of your device (8kb = 1024 * 8 = 8192) subtract above value 2124... = 6068
# - How many pages in is that? 6068 / 64 (tiny85 page size in bytes) = 94.8125
# - round that down to 94 - our new bootloader address is 94 * 64 = 6016, in hex = 1780
-BOOTLOADER_ADDRESS = 1800
+BOOTLOADER_ADDRESS = 1880
PROGRAMMER = -c USBasp
# PROGRAMMER contains AVRDUDE options to address your programmer
@@ -149,10 +149,11 @@ CC = avr-gcc
DEFINES = -DBOOTLOADER_ADDRESS=0x$(BOOTLOADER_ADDRESS) #-DDEBUG_LEVEL=2
# Remove the -fno-* options when you use gcc 3, it does not understand them
#
-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
+CFLAGS = -g2 -nostartfiles -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,--section-start=.text=$(BOOTLOADER_ADDRESS),-Map=main.map,--section-start=.zerotable=0
-OBJECTS = usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
+
+OBJECTS = crt1.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
OBJECTS += libs-device/osccalASM.o
# symbolic targets:
all: main.hex
@@ -197,7 +198,7 @@ main.bin: $(OBJECTS)
main.hex: main.bin
rm -f main.hex main.eep.hex
- avr-objcopy -j .text -j .data -O ihex main.bin main.hex
+ avr-objcopy -j .text -j .zerotable -j .data -O ihex main.bin main.hex
avr-size main.hex
disasm: main.bin