1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

Merge pull request #7928 from smlng/board/bluepill/dfu

bluepill: dfu-util support
This commit is contained in:
Cenk Gündoğan 2017-11-03 13:22:40 +01:00 committed by GitHub
commit 1ea1fe9060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 1 deletions

View File

@ -9,5 +9,22 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# this board uses openocd
# optionally, use dfu-util to flash via usb
# note: needs a bootloader flashed before, config below is compatible
# with blackmagic_dfu, see https://github.com/blacksphere/blackmagic/
# To stop bootloader from loading an existing firmware, pull down
# (ground) GPIO B1.
ifeq ($(PROGRAMMER),dfu-util)
export LINKER_SCRIPT = stm32f103c8_bluepill.ld
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
export FLASHER = dfu-util
export DEBUGGER = # no debugger
export RESET = # dfu-util has no support for resetting the device
export OFLAGS = -O binary
export FFLAGS = -d 1d50:6017 -s 0x08002000:leave -D "$(HEXFILE)"
else
# this board uses openocd by default
include $(RIOTMAKE)/tools/openocd.inc.mk
endif

View File

@ -0,0 +1,29 @@
/*
* Copyright (C) 2015 Alexander Melnikov <avmelnikoff@gmail.com>
* 2017 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @addtogroup cpu_stm32f1
* @{
*
* @file
* @brief Memory definitions for the STM32F103C8
*
* @author Alexander Melnikov <avmelnikoff@gmail.com>
* @author Sebastian Meiling <s@mlng.net>
*
* @}
*/
MEMORY
{
rom (rx) : ORIGIN = 0x08002000, LENGTH = 64K-0x2000
ram (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
}
INCLUDE cortexm_base.ld