boards: make use of serial.inc.mk
This commit is contained in:
parent
bb9f94ec38
commit
adbf671490
@ -3,21 +3,11 @@ include $(RIOTBOARD)/arduino-atmega-common/Makefile.dep
|
|||||||
|
|
||||||
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
|
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
|
||||||
|
|
||||||
# define port used to flash the board
|
# refine serial port information
|
||||||
OS = $(shell uname)
|
export BAUD ?= 9600
|
||||||
ifeq ($(OS),Linux)
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
PORT = $(PORT_LINUX)
|
|
||||||
else ifeq ($(OS),Darwin)
|
|
||||||
PORT ?= $(PORT_DARWIN)
|
|
||||||
else
|
|
||||||
$(info CAUTION: No flash tool for your host system found!)
|
|
||||||
# TODO: fix for building under windows
|
|
||||||
endif
|
|
||||||
|
|
||||||
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
|
|
||||||
export TERMFLAGS ?= -b 9600 -p $(PORT)
|
|
||||||
export FLASHER = avrdude
|
export FLASHER = avrdude
|
||||||
export PORT
|
|
||||||
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
||||||
export DEBUGSERVER_PORT = 4242
|
export DEBUGSERVER_PORT = 4242
|
||||||
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
||||||
|
|||||||
@ -2,7 +2,10 @@
|
|||||||
export CPU = lpc2387
|
export CPU = lpc2387
|
||||||
|
|
||||||
FLASHER = lpc2k_pgm
|
FLASHER = lpc2k_pgm
|
||||||
TERMPROG ?= $(RIOTBASE)/dist/tools/pyterm/pyterm
|
|
||||||
|
# configure serial interface
|
||||||
|
export TERMFLAGS += -tg -p "$(PORT)"
|
||||||
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|
||||||
export CFLAGS_CPU = -mcpu=arm7tdmi-s
|
export CFLAGS_CPU = -mcpu=arm7tdmi-s
|
||||||
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
|
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
|
||||||
@ -22,7 +25,6 @@ ifeq ($(PORT),)
|
|||||||
export PORT = /dev/ttyUSB0
|
export PORT = /dev/ttyUSB0
|
||||||
endif
|
endif
|
||||||
export FFLAGS = $(PORT) $(HEXFILE)
|
export FFLAGS = $(PORT) $(HEXFILE)
|
||||||
export TERMFLAGS += -tg -p "$(PORT)"
|
|
||||||
|
|
||||||
export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include
|
export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,11 @@ export CPU_MODEL = stm32f103cb
|
|||||||
# the spark-core uses its own custom linkerscript...
|
# the spark-core uses its own custom linkerscript...
|
||||||
export LINKER_SCRIPT = stm32f103cb_sparkcore.ld
|
export LINKER_SCRIPT = stm32f103cb_sparkcore.ld
|
||||||
|
|
||||||
# set the default port
|
# configure the serial interface
|
||||||
export PORT ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|
||||||
#
|
|
||||||
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
|
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
|
||||||
|
|
||||||
export FLASHER = dfu-util
|
export FLASHER = dfu-util
|
||||||
@ -17,12 +18,8 @@ export RESET = # dfu-util has no support for resetting the device
|
|||||||
|
|
||||||
export OFLAGS = -O binary
|
export OFLAGS = -O binary
|
||||||
export FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)"
|
export FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)"
|
||||||
export TERMFLAGS = -p $(PORT)
|
|
||||||
|
|
||||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/
|
||||||
|
|
||||||
# setup serial terminal
|
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
|||||||
@ -1,6 +1,12 @@
|
|||||||
# define the cpu used by the waspmote pro board
|
# define the cpu used by the waspmote pro board
|
||||||
export CPU = atmega1281
|
export CPU = atmega1281
|
||||||
|
|
||||||
|
# configure the terminal program
|
||||||
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||||
|
BAUD ?= 9600
|
||||||
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||||
|
|
||||||
# define tools used for building the project
|
# define tools used for building the project
|
||||||
export PREFIX = avr-
|
export PREFIX = avr-
|
||||||
export CC = $(PREFIX)gcc
|
export CC = $(PREFIX)gcc
|
||||||
@ -10,24 +16,8 @@ export AS = $(PREFIX)as
|
|||||||
export LINK = $(PREFIX)gcc
|
export LINK = $(PREFIX)gcc
|
||||||
export SIZE = $(PREFIX)size
|
export SIZE = $(PREFIX)size
|
||||||
export OBJCOPY = $(PREFIX)objcopy
|
export OBJCOPY = $(PREFIX)objcopy
|
||||||
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
|
|
||||||
export TERMFLAGS = -b 9600 -p $(PORT)
|
|
||||||
|
|
||||||
#define the flash-tool and default port depending on the host operating system
|
export FLASHER = avrdude
|
||||||
OS = $(shell uname)
|
|
||||||
ifeq ($(OS),Linux)
|
|
||||||
PORT ?= /dev/ttyACM0
|
|
||||||
FLASHER = avrdude
|
|
||||||
else ifeq ($(OS),Darwin)
|
|
||||||
PORT ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|
||||||
FLASHER = avrdude
|
|
||||||
else
|
|
||||||
$(info CAUTION: No flash tool for your host system found!)
|
|
||||||
# TODO: fix for building under windows
|
|
||||||
endif
|
|
||||||
|
|
||||||
export FLASHER
|
|
||||||
export PORT
|
|
||||||
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
||||||
export DEBUGSERVER_PORT = 4242
|
export DEBUGSERVER_PORT = 4242
|
||||||
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user