projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Working toward some ARM targets.
[goodfet]
/
firmware
/
Makefile
diff --git
a/firmware/Makefile
b/firmware/Makefile
index
07f1765
..
35a8bb6
100644
(file)
--- a/
firmware/Makefile
+++ b/
firmware/Makefile
@@
-2,45
+2,24
@@
platform?=goodfet
platform?=goodfet
-
-# donb
-ifeq ($(platform),donbfet)
-GCC?=avr-gcc
-mcu?=atmega644p
-CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
-endif
-
+mcu?=RUNCONFIG
#include `uname`.mak
GOODFET?=/dev/tty.usbser*
#include `uname`.mak
GOODFET?=/dev/tty.usbser*
-#For Arduino,
-#BSL?=avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/tty.usbserial-* -U flash:w:blink.hex
#For tos-bsl, use --invert-reset --invert-test
MSP430BSL?=goodfet.bsl --speed=38400
JTAG=msp430-jtag
#For tos-bsl, use --invert-reset --invert-test
MSP430BSL?=goodfet.bsl --speed=38400
JTAG=msp430-jtag
-#One of these should be defined explicitly.
-#Default removed because of confusion.
-#mcu?=msp430x2618
-#mcu?=msp430x1612
-#mcu?=atmega168
-mcu?=RUNCONFIG
-
-
-#N.B., gcc WILL NOT BITCH if this file doesn't exist.
GCCINC?=
GCCINC?=
-#GCC?=avr-gcc
-# We use -Wl,-dT because gcc adds the msp430mcu definitions at the
-# very end of the command line, so they only have an effect for a
-# default linker script
-GCC?=msp430-gcc
-LDFLAGS?=-Wl,-dT ldscripts/$(mcu).x
+#All of these are ?= in order ot allow overriding.
+GCC?=msp430-gcc -mmcu=$(mcu)
+LDFLAGS?=-mmcu=$(mcu) #-Wl,-dT ldscripts/$(mcu).x
-CCEXTRA
?= $(CFLAGS) -D$(mcu) -D$(platform) -Dplatform=$(platform
) $(GCCINC) -I include -I platforms
-CC
=$(GCC) -Wall -Os -fno-strict-aliasing -g -mmcu=$(mcu)
$(CCEXTRA)
+CCEXTRA
?= $(CFLAGS) -D$(mcu) -D$(platform) -Dplatform=$(platform) -Dboard=$(board
) $(GCCINC) -I include -I platforms
+CC
=$(GCC) -Wall -O1 -fno-strict-aliasing -g
$(CCEXTRA)
# Available Applications
# ======================
# Available Applications
# ======================
@@
-115,7
+94,7
@@
CC=$(GCC) -Wall -Os -fno-strict-aliasing -g -mmcu=$(mcu) $(CCEXTRA)
ifeq ($(platform),tilaunchpad)
config ?= monitor chipcon i2c
else
ifeq ($(platform),tilaunchpad)
config ?= monitor chipcon i2c
else
-config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi
+config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi
maxusb
endif
endif
@@
-158,6
+137,14
@@
ifeq ($(filter jtag, $(config)), jtag)
endif
endif
endif
endif
+# include MAX342x USB drivers.
+ifeq ($(filter maxusb, $(config)), maxusb)
+ ifneq ($(filter apps/usb/maxusb.o, $(apps)), apps/usb/maxusb.o)
+ apps+= apps/usb/maxusb.o
+ hdrs+= maxusb.h
+ endif
+endif
+
# include the sbw defs if they specified it
ifeq ($(filter sbw, $(config)), sbw)
# if they only specify sbw, include jtag
# include the sbw defs if they specified it
ifeq ($(filter sbw, $(config)), sbw)
# if they only specify sbw, include jtag
@@
-285,7
+272,7
@@
endif
# include adc app
ifeq ($(filter adc, $(config)), adc)
# include adc app
ifeq ($(filter adc, $(config)), adc)
- ifeq ($(mcu), msp430
x
2274)
+ ifeq ($(mcu), msp430
f
2274)
apps+= apps/adc/adc.o
hdrs+= adc.h
else
apps+= apps/adc/adc.o
hdrs+= adc.h
else