mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
Merge pull request #11039 from maribu/avrdude
makefiles/tools: Improved avrdude integration
This commit is contained in:
commit
d29d336894
@ -10,8 +10,6 @@ BAUD ?= 9600
|
|||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
# using avrdude. Can be overridden for debugging (which requires changes
|
||||||
# that require to use an ISP)
|
# that require to use an ISP)
|
||||||
PROGRAMMER ?= arduino
|
PROGRAMMER ?= arduino
|
||||||
# set mcu model for avrdude
|
|
||||||
FFLAGS += -p m328p
|
|
||||||
# configure programmer speed in baud
|
# configure programmer speed in baud
|
||||||
FFLAGS_EXTRA += -b 57600
|
FFLAGS_EXTRA += -b 57600
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,6 @@ BAUD ?= 9600
|
|||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
# using avrdude. Can be overridden for debugging (which requires changes
|
||||||
# that require to use an ISP)
|
# that require to use an ISP)
|
||||||
PROGRAMMER ?= stk500v2
|
PROGRAMMER ?= stk500v2
|
||||||
# set mcu model for avrdude
|
|
||||||
FFLAGS += -p m2560
|
|
||||||
# configure programmer speed in baud
|
# configure programmer speed in baud
|
||||||
FFLAGS_EXTRA += -b 115200
|
FFLAGS_EXTRA += -b 115200
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,6 @@ BAUD ?= 9600
|
|||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
# using avrdude. Can be overridden for debugging (which requires changes
|
||||||
# that require to use an ISP)
|
# that require to use an ISP)
|
||||||
PROGRAMMER ?= arduino
|
PROGRAMMER ?= arduino
|
||||||
# set mcu model for avrdude
|
|
||||||
FFLAGS += -p m328p
|
|
||||||
# configure programmer speed in baud
|
# configure programmer speed in baud
|
||||||
FFLAGS_EXTRA += -b 115200
|
FFLAGS_EXTRA += -b 115200
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
# using avrdude. Can be overridden for debugging (which requires changes
|
||||||
# that require to use an ISP)
|
# that require to use an ISP)
|
||||||
PROGRAMMER ?= wiring
|
PROGRAMMER ?= wiring
|
||||||
# set mcu model for avrdude (mandatory)
|
|
||||||
FFLAGS += -p atmega256rfr2
|
|
||||||
# Serial Baud rate for flasher is configured to 500kBaud
|
# Serial Baud rate for flasher is configured to 500kBaud
|
||||||
# see /usr/include/asm-generic/termbits.h for availabel baudrates on your linux system
|
# see /usr/include/asm-generic/termbits.h for availabel baudrates on your linux system
|
||||||
FFLAGS_EXTRA += -b 0010005
|
FFLAGS_EXTRA += -b 0010005
|
||||||
|
|||||||
@ -14,8 +14,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
|
|
||||||
# PROGRAMMER defaults to the external flasher Bus Pirate ISP using avrdude.
|
# PROGRAMMER defaults to the external flasher Bus Pirate ISP using avrdude.
|
||||||
PROGRAMMER ?= buspirate
|
PROGRAMMER ?= buspirate
|
||||||
# set mcu model for avrdude
|
|
||||||
FFLAGS += -p m1284p
|
|
||||||
# set serial port for avrdude with buspirate
|
# set serial port for avrdude with buspirate
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
AVRDUDE_PORT ?= /dev/ttyUSB0
|
AVRDUDE_PORT ?= /dev/ttyUSB0
|
||||||
|
|||||||
@ -17,8 +17,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
# using avrdude. Can be overridden for debugging (which requires changes
|
||||||
# that require to use an ISP)
|
# that require to use an ISP)
|
||||||
PROGRAMMER ?= stk500v1
|
PROGRAMMER ?= stk500v1
|
||||||
# set mcu model for avrdude
|
|
||||||
FFLAGS += -p m1281
|
|
||||||
# configure programmer speed in baud
|
# configure programmer speed in baud
|
||||||
FFLAGS_EXTRA += -b 115200
|
FFLAGS_EXTRA += -b 115200
|
||||||
# avoid error if mcu signature doesn't match
|
# avoid error if mcu signature doesn't match
|
||||||
|
|||||||
@ -6,10 +6,16 @@ DEBUGSERVER_FLAGS = "-g -j usb :$(DEBUGSERVER_PORT)"
|
|||||||
DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
||||||
DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
||||||
|
|
||||||
# make the flasher port configurable (e.g. with atmelice the port is usb)
|
PROGRAMMER_FLAGS = -p $(subst atmega,m,$(CPU))
|
||||||
# defaults to terminal's serial port if not configured
|
|
||||||
AVRDUDE_PORT ?= $(PORT)
|
# Set flasher port only for programmers that require it
|
||||||
PROGRAMMER_FLAGS = -P $(AVRDUDE_PORT) $(FFLAGS_EXTRA)
|
ifneq (,$(filter $(PROGRAMMER),arduino buspirate stk500v1 stk500v2 wiring))
|
||||||
|
# make the flasher port configurable (e.g. with atmelice the port is usb)
|
||||||
|
# defaults to terminal's serial port if not configured
|
||||||
|
AVRDUDE_PORT ?= $(PORT)
|
||||||
|
PROGRAMMER_FLAGS += -P $(AVRDUDE_PORT)
|
||||||
|
endif
|
||||||
|
PROGRAMMER_FLAGS += $(FFLAGS_EXTRA)
|
||||||
|
|
||||||
# don't force to flash HEXFILE, but set it as default
|
# don't force to flash HEXFILE, but set it as default
|
||||||
FLASHFILE ?= $(HEXFILE)
|
FLASHFILE ?= $(HEXFILE)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user