summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--avr/Tupfile14
-rw-r--r--avr/main.c2
-rw-r--r--configs/debug.config1
-rw-r--r--configs/m1281-debug.config2
-rw-r--r--configs/m2561-debug.config2
6 files changed, 18 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 1dc5864..a025d68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,7 @@
/.project
/.settings
/.tup
-/build-debug
+/build-*
/doc
/joe
/scratch
-
diff --git a/avr/Tupfile b/avr/Tupfile
index d73db12..331c11f 100644
--- a/avr/Tupfile
+++ b/avr/Tupfile
@@ -25,9 +25,19 @@ SRC_Z = ../z180/hdrom.c
#TARGETS = $(PROG).elf
-MCU_TARGET = atmega1281
+ifdef MCU
+ MCU_TARGET = @(MCU)
+else
+ MCU_TARGET = atmega1281
+endif
+ifeq ($(MCU_TARGET),atmega1281)
+ DEFS += -DMCU_STRING=\"ATmega1281\"
+else
+ DEFS += -DMCU_STRING=\"ATmega2561\"
+endif
+
F_CPU = 18432000UL
-DEFS = -DF_CPU=$(F_CPU)
+DEFS += -DF_CPU=$(F_CPU)
INCLUDES += -I$(TOP)/include
diff --git a/avr/main.c b/avr/main.c
index 3852e75..b8ce26d 100644
--- a/avr/main.c
+++ b/avr/main.c
@@ -277,7 +277,7 @@ int main(void)
setup_system_time();
setup_fatfs();
- printf_P(PSTR("\nATMEGA1281+Z8S180 Stamp Monitor\n\n"));
+ printf_P(PSTR("\n" MCU_STRING "+Z8S180 Stamp Monitor\n\n"));
setup_z180_serv();
diff --git a/configs/debug.config b/configs/debug.config
deleted file mode 100644
index 1a54f76..0000000
--- a/configs/debug.config
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_DEBUG=0
diff --git a/configs/m1281-debug.config b/configs/m1281-debug.config
new file mode 100644
index 0000000..db4eb98
--- /dev/null
+++ b/configs/m1281-debug.config
@@ -0,0 +1,2 @@
+CONFIG_DEBUG=0
+CONFIG_MCU=atmega1281
diff --git a/configs/m2561-debug.config b/configs/m2561-debug.config
new file mode 100644
index 0000000..2366681
--- /dev/null
+++ b/configs/m2561-debug.config
@@ -0,0 +1,2 @@
+CONFIG_DEBUG=0
+CONFIG_MCU=atmega2561