mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
d4ca2644a3
iotlab-m3 boards always ended up not being able to flash after time. This changes managed to fix and flash boards that where able to be flashed with the deprecated `ft2232` driver and not with the `ftdi` driver used in RIOT. It combines configuration from openocd, iot-lab, RIOT config and Alexandre Abadie feedback * http://repo.or.cz/openocd.git/blob/HEAD:/tcl/interface/ftdi/iotlab-usb.cfg * ftdi configuration * https://github.com/iot-lab/iot-lab-gateway/blob/2.4.1/gateway_code/static/iot-lab-m3.cfg * `trst_and_srst` config * Alexandre feedback and http://openocd.org/doc/html/Reset-Configuration.html * 'connect_assert_srst' reset configuration * it prevents errors in the output on first flash * should help on boards with invalid code * It was taken from what Alexandre found for board 'b-l072z-lrwan1' * It requires using '-c reset halt' instead of '-c halt' before debug * RIOT * Keep the `configure -rtos` auto
22 lines
633 B
Makefile
22 lines
633 B
Makefile
# the cpu to build for
|
|
export CPU = stm32f1
|
|
export CPU_MODEL = stm32f103re
|
|
|
|
# define the default port depending on the host OS
|
|
PORT_LINUX ?= /dev/ttyUSB1
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B)))
|
|
|
|
# setup serial terminal
|
|
export BAUD = 500000
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
# call a 'reset halt' command before starting the debugger
|
|
# it is required as `connect_assert_srst` is set
|
|
export OPENOCD_DBG_START_CMD = -c 'reset halt'
|
|
|
|
# this board uses openocd
|
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
|
|
# add the common header files to the include path
|
|
INCLUDES += -I$(RIOTBOARD)/common/iotlab/include
|