atmega328 mcu
[goodfet] / firmware / config.mk
index 84ff47f..43eba48 100644 (file)
@@ -13,6 +13,14 @@ MSP430BSL?=goodfet.bsl --speed=38400 --swap-reset-test
 CFLAGS += -Duseuart1 -Dapimote
 endif
 
+ifneq (,$(findstring $(board),apimote2))
+mcu ?= msp430f2618
+platform := apimote2
+config := monitor spi ccspi
+MSP430BSL?=goodfet.bsl --speed=38400
+CFLAGS += -Duseuart1 -Dapimote
+endif
+
 ifneq (,$(findstring $(board),goodthopter01 goodthopter10 goodthopter11))
 mcu ?= msp430f2274
 platform := goodfet
@@ -29,7 +37,7 @@ mcu ?= msp430f2618
 platform := goodfet
 endif
 
-ifneq (,$(findstring $(board),goodfet30 goodfet31))
+ifneq (,$(findstring $(board),goodfet30 goodfet31 goodfet32))
 mcu ?= msp430f2274
 platform := goodfet
 # This will link to fit in a '2254, so unneeded packages should be omited.
@@ -162,10 +170,14 @@ endif
 
 ifneq (,$(findstring $(board),arduino))
 GCC := avr-gcc
-mcu ?= atmega168
-#BSL := avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/tty.usbserial-* -U flash:w:blink.hex
+CP   = avr-objcopy
+mcu ?= atmega328
+platform ?= arduino
+#BSL := avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/ttyACM0 -U flash:w:goodfet.hex
+CFLAGS=$(DEBUG) -Iinclude -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
 LDFLAGS := 
 config := monitor
+AVR_PLATFORM := m328p
 endif
 
 ifneq (,$(findstring $(board),tilaunchpad))