X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2FMakefile;h=fbf5a33ef01cf103151dad4f96b0802b55a509d7;hb=ade126909433e898a0e94b54cce159244473ebe6;hp=3dcd605dd8736a95da4402743a1f2821a4fb5ddc;hpb=69539bb167246135b1bde3c55dca7d19bc3c7aee;p=goodfet diff --git a/firmware/Makefile b/firmware/Makefile index 3dcd605..fbf5a33 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -9,6 +9,12 @@ #platform?=tilaunchpad 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 ifeq ($(platform),tilaunchpad) mcu?=msp430x1612 @@ -119,6 +125,11 @@ else config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi endif +# donb +ifeq ($(platform),donbfet) +config=monitor avr spi jscan +endif + # Build the needed list of app and lib object files from the config apps= @@ -144,6 +155,12 @@ ifeq ($(filter spi, $(config)), spi) hdrs+= spi.h endif +# include twe app +ifeq ($(filter twe, $(config)), twe) + apps+= apps/twe/twe.o + hdrs+= twe.h +endif + # include base jtag if they specified it explicitly ifeq ($(filter jtag, $(config)), jtag) ifneq ($(filter apps/jtag/jtag.o, $(apps)), apps/jtag/jtag.o) @@ -317,6 +334,12 @@ ifeq ($(filter ps2, $(config)), ps2) hdrs+= ps2.h endif +# include jscan app +ifeq ($(filter jscan, $(config)), jscan) + apps+= apps/jscan/jscan.o + hdrs+= jscan.h +endif + # Rules app= goodfet @@ -366,8 +389,14 @@ erase: $(MSP430BSL) -e $(app).c: config builddate appsfiles err $(app): $(libs) $(apps) + +ifeq ($(platform),donbfet) +$(app).hex: $(app) + avr-objcopy -j .text -j .data -O ihex goodfet goodfet.hex +else $(app).hex: $(app) msp430-objcopy goodfet -O ihex goodfet.hex +endif m4s: $(app).hex msp430-objdump -D -m msp430 $(app).hex | m4s init clean: