]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
Add build configuration for ATmega2561
authorLeo C <erbl259-lmu@yahoo.de>
Mon, 21 Mar 2016 22:06:23 +0000 (23:06 +0100)
committerLeo C <erbl259-lmu@yahoo.de>
Mon, 21 Mar 2016 22:06:23 +0000 (23:06 +0100)
.gitignore
avr/Tupfile
avr/main.c
configs/debug.config [deleted file]
configs/m1281-debug.config [new file with mode: 0644]
configs/m2561-debug.config [new file with mode: 0644]

index 1dc5864ab754142f3195ac481549f38a4029fe19..a025d689f78c9f4e78069b228c69c5ff8fcbd6bb 100644 (file)
@@ -3,8 +3,7 @@
 /.project
 /.settings
 /.tup
-/build-debug
+/build-*
 /doc
 /joe
 /scratch
-
index d73db12fb4f391127025161dd09b3f370ec666a4..331c11f0196f0e95404dd92660203ac03ad87696 100644 (file)
@@ -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
 
index 3852e754a5ba59477cf813421ebfcc36fea0f3c2..b8ce26d91886409465bcaec4a87fb2dd02441d2a 100644 (file)
@@ -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 (file)
index 1a54f76..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_DEBUG=0
diff --git a/configs/m1281-debug.config b/configs/m1281-debug.config
new file mode 100644 (file)
index 0000000..db4eb98
--- /dev/null
@@ -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 (file)
index 0000000..2366681
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG_DEBUG=0
+CONFIG_MCU=atmega2561