mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: leverage avrdude.inc.mk for atmega based boards.
Additionally, it removes unnecessary exports and cleans up waspmote-pro toolchain variables (not needed) which are taken from atmega_common.
This commit is contained in:
parent
1a98d64cd5
commit
d208cba464
@ -1,26 +1,27 @@
|
||||
# define the cpu used by the jiminy board
|
||||
export CPU = atmega256rfr2
|
||||
|
||||
# export needed for flash rule
|
||||
export PORT_LINUX ?= /dev/ttyACM0
|
||||
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
||||
# Serial Baud rate for Ffasher is configured to 500kBaud
|
||||
# see /usr/include/asm-generic/termbits.h for availabel baudrates on your linux system
|
||||
export PROGRAMMER_SPEED ?= 0010005
|
||||
|
||||
export FFLAGS += -p atmega256rfr2
|
||||
|
||||
# configure the terminal program
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
# refine serial port information for pyterm
|
||||
# For 8MHz F_CPU following Baudrate have good error rates
|
||||
# 76923
|
||||
# 38400
|
||||
BAUD = 38400
|
||||
BAUD ?= 38400
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# PROGRAMMER defaults to arduino which is the internal flasher via USB. Can be
|
||||
# overridden for debugging (which requires changes that require to use an ISP)
|
||||
export PROGRAMMER ?= wiring
|
||||
# PROGRAMMER defaults to wiring which is the internal flasher via USB
|
||||
# using avrdude. Can be overridden for debugging (which requires changes
|
||||
# that require to use an ISP)
|
||||
PROGRAMMER ?= wiring
|
||||
# set mcu model for avrdude (mandatory)
|
||||
FFLAGS += -p atmega256rfr2
|
||||
# Serial Baud rate for flasher is configured to 500kBaud
|
||||
# see /usr/include/asm-generic/termbits.h for availabel baudrates on your linux system
|
||||
FFLAGS_EXTRA += -b 0010005
|
||||
# avoid error if mcu signature doesn't match
|
||||
FFLAGS_EXTRA += -F
|
||||
|
||||
# From current fuse configuration
|
||||
BOOTLOADER_SIZE ?= 4K
|
||||
|
@ -7,23 +7,22 @@ BOOTLOADER_SIZE ?= 4K
|
||||
ROM_RESERVED ?= $(BOOTLOADER_SIZE)
|
||||
|
||||
# configure the terminal program
|
||||
export PORT_LINUX ?= /dev/ttyACM0
|
||||
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
export BAUD ?= 9600
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
BAUD ?= 9600
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
export FLASHER = avrdude
|
||||
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
||||
export DEBUGSERVER_PORT = 4242
|
||||
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
||||
export DEBUGSERVER_FLAGS = "-g -j usb :$(DEBUGSERVER_PORT)"
|
||||
export DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
||||
export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
||||
# PROGRAMMER defaults to the external flasher Bus Pirate ISP using avrdude.
|
||||
PROGRAMMER ?= buspirate
|
||||
# set mcu model for avrdude
|
||||
FFLAGS += -p m1284p
|
||||
# set serial port for avrdude with buspirate
|
||||
ifeq ($(OS),Linux)
|
||||
AVRDUDE_PORT ?= /dev/ttyUSB0
|
||||
else ifeq ($(OS),Darwin)
|
||||
AVRDUDE_PORT ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
endif
|
||||
# avoid error if mcu signature doesn't match
|
||||
FFLAGS_EXTRA += -F
|
||||
|
||||
# PROGRAMMER defaults to the Bus Pirate ISP
|
||||
export PROGRAMMER ?= buspirate
|
||||
|
||||
export PROGRAMMER_FLAGS = -P /dev/ttyUSB0
|
||||
|
||||
OFLAGS += -j .text -j .data
|
||||
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)
|
||||
include $(RIOTMAKE)/tools/avrdude.inc.mk
|
||||
|
@ -13,31 +13,15 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
BAUD ?= 9600
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# define tools used for building the project
|
||||
export PREFIX = avr-
|
||||
export CC = $(PREFIX)gcc
|
||||
export CXX = $(PREFIX)c++
|
||||
export AR = $(PREFIX)ar
|
||||
export AS = $(PREFIX)as
|
||||
export LINK = $(PREFIX)gcc
|
||||
export SIZE = $(PREFIX)size
|
||||
export OBJCOPY = $(PREFIX)objcopy
|
||||
# PROGRAMMER defaults to stk500v1 which is the internal flasher via USB
|
||||
# using avrdude. Can be overridden for debugging (which requires changes
|
||||
# that require to use an ISP)
|
||||
PROGRAMMER ?= stk500v1
|
||||
# set mcu model for avrdude
|
||||
FFLAGS += -p m1281
|
||||
# configure programmer speed in baud
|
||||
FFLAGS_EXTRA += -b 115200
|
||||
# avoid error if mcu signature doesn't match
|
||||
FFLAGS_EXTRA += -F
|
||||
|
||||
export FLASHER = avrdude
|
||||
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
||||
export DEBUGSERVER_PORT = 4242
|
||||
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
||||
export DEBUGSERVER_FLAGS = "-g -j usb :$(DEBUGSERVER_PORT)"
|
||||
export DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
||||
export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
||||
|
||||
# PROGRAMMER defaults to stk500v1 which is the internal flasher via USB. Can be
|
||||
# overridden for debugging (which requires changes that require to use an ISP)
|
||||
export PROGRAMMER ?= stk500v1
|
||||
|
||||
ifeq ($(PROGRAMMER), stk500v1)
|
||||
export PROGRAMMER_FLAGS = -P $(PORT) -b 115200
|
||||
endif
|
||||
|
||||
OFLAGS += -j .text -j .data
|
||||
export FFLAGS += -p m1281 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)
|
||||
include $(RIOTMAKE)/tools/avrdude.inc.mk
|
||||
|
Loading…
Reference in New Issue
Block a user