From de7bcda99ffd8ee8287a9a2d760983acfaea39d8 Mon Sep 17 00:00:00 2001 From: dak664 Date: Tue, 8 Mar 2011 13:07:00 -0500 Subject: [PATCH] avrdude and makefile changes suggested by Georg von Zengen --- cpu/avr/Makefile.avr | 2 +- platform/avr-raven/Makefile.avr-raven | 8 ++++++-- platform/avr-raven/cfs-coffee-arch.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cpu/avr/Makefile.avr b/cpu/avr/Makefile.avr index 636fdbe7d..bb9af8beb 100644 --- a/cpu/avr/Makefile.avr +++ b/cpu/avr/Makefile.avr @@ -139,7 +139,7 @@ ifndef NOAVRSIZE endif %.hex: %.out - $(OBJCOPY) $^ -O ihex $@ + $(OBJCOPY) $^ -j .text -j .data -O ihex $@ %.ihex: %.out $(OBJCOPY) $^ -O ihex $@ diff --git a/platform/avr-raven/Makefile.avr-raven b/platform/avr-raven/Makefile.avr-raven index 77750bcf3..c9ce84473 100644 --- a/platform/avr-raven/Makefile.avr-raven +++ b/platform/avr-raven/Makefile.avr-raven @@ -3,6 +3,8 @@ CONTIKI_TARGET_DIRS = . apps net loader CONTIKI_CORE=contiki-raven-main CONTIKI_TARGET_MAIN = ${CONTIKI_CORE}.o CONTIKI_TARGET_SOURCEFILES += contiki-raven-main.c contiki-raven-default-init-net.c +#The avr cpu makefile will also add these files if COFFEE_FILES is specified. +CONTIKI_TARGET_SOURCEFILES += cfs-coffee.c cfs-coffee-arch.c CONTIKIAVR=$(CONTIKI)/cpu/avr CONTIKIBOARD=. @@ -17,12 +19,14 @@ AVRDUDE_PROGRAMMER=jtag2 # # The example is for an JTAGICE mkII used to program an ATmega128: # avrdude -v -P usb:xxxx -c jtag2 -p atmega128 -AVRDUDE_PORT=usb:00B000000D79 +#AVRDUDE_PORT=usb:00B000000D79 +AVRDUDE_PORT=usb # Additional avrdude options # Verify off -AVRDUDE_OPTIONS=-V +#AVRDUDE_OPTIONS=-V +AVRDUDE_OPTIONS= include $(CONTIKIAVR)/Makefile.avr diff --git a/platform/avr-raven/cfs-coffee-arch.h b/platform/avr-raven/cfs-coffee-arch.h index 163b9ec01..ab37f22e9 100644 --- a/platform/avr-raven/cfs-coffee-arch.h +++ b/platform/avr-raven/cfs-coffee-arch.h @@ -52,7 +52,7 @@ #define COFFEE_STATIC 1 #elif COFFEE_FILES==2 //2=eeprom for full file system #define COFFEE_AVR_EEPROM 1 -#elif COFFEE_FILES==2 //3=program flash for static file system +#elif COFFEE_FILES==3 //3=program flash for static file system #define COFFEE_AVR_FLASH 1 #define COFFEE_STATIC 1 #else //4=program flash with full file system