summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2014-03-16 06:55:13 +0100
committercpldcpu <cpldcpu@gmail.com>2014-03-16 06:55:13 +0100
commitd344c1f50ed8c0597f8f1b00f7f5b4afb0ef5da3 (patch)
treeef8df2e4585ba03f61c72e086c2412da158d8ae7 /firmware
parent669291b45aef8008c53ad7f078e94ed7cc183d7d (diff)
downloadmicronucleus-d344c1f50ed8c0597f8f1b00f7f5b4afb0ef5da3.tar.gz
micronucleus-d344c1f50ed8c0597f8f1b00f7f5b4afb0ef5da3.tar.bz2
micronucleus-d344c1f50ed8c0597f8f1b00f7f5b4afb0ef5da3.zip
firmware: makefile clean up
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile18
1 files changed, 8 insertions, 10 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index aec801d..da91312 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -6,8 +6,9 @@
# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt)
-CONFIGURATION = t85_default
-#CONFIGURATION = t85_aggressive
+#CONFIG ?= t85_default
+#CONFIG ?= t85_aggressive
+CONFIG ?= t841_default
###############################################################################
# Configure the following variables according to your AVR.
@@ -16,10 +17,10 @@ CONFIGURATION = t85_default
# make flash # to load the boot loader into flash
# make disablereset # use external reset line for IO (CAUTION: this is not easy to enable again, see README)
-CONFIGPATH = configuration/$(CONFIGURATION)
+CONFIGPATH = configuration/$(CONFIG)
include $(CONFIGPATH)/Makefile.inc
-PROGRAMMER = -c USBasp
+PROGRAMMER ?= -c USBasp
# PROGRAMMER contains AVRDUDE options to address your programmer
# Tools:
@@ -27,18 +28,15 @@ AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE)
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 = -I. -I$(CONFIGPATH) -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) $(DEFINES)
-CFLAGS += -g2 -Wall -Os
+CFLAGS = -I. -g2 -Wall -Os
+CFLAGS += -I$(CONFIGPATH) -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) -DBOOTLOADER_ADDRESS=0x$(BOOTLOADER_ADDRESS)
CFLAGS += -nostartfiles -ffunction-sections -fdata-sections -fpack-struct -fno-inline-small-functions -fno-move-loop-invariants -fno-tree-scev-cprop
LDFLAGS = -Wl,--relax,--section-start=.text=$(BOOTLOADER_ADDRESS),-Map=main.map
-
OBJECTS = crt1.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
OBJECTS += osccalASM.o
+
# symbolic targets:
all: main.hex