Merge pull request #134 from darconeous/pull-requests/cpu-avr-avrdude-mcu

cpu/avr: Added "AVRDUDE_MCU" configuration parameter.
This commit is contained in:
Robert Quattlebaum 2013-05-19 17:35:26 -07:00
commit 09eec82d08
3 changed files with 12 additions and 4 deletions

View file

@ -192,17 +192,23 @@ endif
### Upload image
#Let avrdude use defaults if port or programmer not defined
AVRDUDE ?= avrdude
ifdef AVRDUDE_PORT
AVRDUDE_PORT:=-P $(AVRDUDE_PORT)
endif
ifdef AVRDUDE_PROGRAMMER
AVRDUDE_PROGRAMMER:=-c $(AVRDUDE_PROGRAMMER)
endif
ifdef AVRDUDE_MCU
AVRDUDE_MCU:=-p $(AVRDUDE_MCU)
else
AVRDUDE_MCU:=-p $(MCU)
endif
%.u: %.hex
avrdude $(AVRDUDE_OPTIONS) $(AVRDUDE_PORT) $(AVRDUDE_PROGRAMMER) -p $(MCU) -U flash:w:$<
$(AVRDUDE) $(AVRDUDE_MCU) $(AVRDUDE_OPTIONS) $(AVRDUDE_PORT) $(AVRDUDE_PROGRAMMER) -U flash:w:$<
%.eu: %.eep
avrdude ${AVRDUDE_OPTIONS} -P ${AVRDUDE_PORT} -c ${AVRDUDE_PROGRAMMER} -p ${MCU} -U eeprom:w:$<
$(AVRDUDE) $(AVRDUDE_MCU) ${AVRDUDE_OPTIONS} ${AVRDUDE_PORT} ${AVRDUDE_PROGRAMMER} -U eeprom:w:$<
symbols.c:
cp ${CONTIKI}/tools/empty-symbols.c symbols.c

View file

@ -26,6 +26,7 @@ AVRDUDE_PORT=usb:00B000000D79
# Additional avrdude options
# Verify off
AVRDUDE_OPTIONS=-V
AVRDUDE_MCU=m128rfa1
include $(CONTIKIAVR)/Makefile.avr

View file

@ -14,7 +14,6 @@ CONTIKIBOARD=.
CONTIKI_PLAT_DEFS = -DF_CPU=8000000UL -DAUTO_CRC_PADDING=2
MCU=atmega1284p
AVRDUDE_PROGRAMMER=jtag2
# For usb devices, you may either use PORT=usb, or (e.g. if you have more than one
# programmer connected) you can use the following trick to find out the serial number:
@ -24,12 +23,14 @@ AVRDUDE_PROGRAMMER=jtag2
#AVRDUDE_PORT=usb:00B000000D79
AVRDUDE_PORT=usb
# Assume that the user has already configured AVRDUDE to use a specific programmer.
#AVRDUDE_PROGRAMMER?=jtag2
# Additional avrdude options
# Verify off
#AVRDUDE_OPTIONS=-V
AVRDUDE_OPTIONS=
AVRDUDE_MCU=m1284p
include $(CONTIKIAVR)/Makefile.avr
include $(CONTIKIAVR)/radio/Makefile.radio