From 3ce0eecbb3eb79bc9fa5a48b125fa8c248048484 Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 9 Jun 2015 18:59:15 +0200 Subject: [PATCH] OpenOCD st-link config files now saved on git --- radio/src/targets/stlink-v2.cfg | 9 ++++++ radio/src/targets/stm32f2x_stlink.cfg | 20 +++++++++++++ radio/src/targets/stm32f4x_stlink.cfg | 42 +++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100755 radio/src/targets/stlink-v2.cfg create mode 100755 radio/src/targets/stm32f2x_stlink.cfg create mode 100755 radio/src/targets/stm32f4x_stlink.cfg diff --git a/radio/src/targets/stlink-v2.cfg b/radio/src/targets/stlink-v2.cfg new file mode 100755 index 000000000..e145d6353 --- /dev/null +++ b/radio/src/targets/stlink-v2.cfg @@ -0,0 +1,9 @@ +# +# STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer +# + +interface hla +hla_layout stlink +hla_device_desc "ST-LINK/V2" +hla_vid_pid 0x0483 0x3748 + diff --git a/radio/src/targets/stm32f2x_stlink.cfg b/radio/src/targets/stm32f2x_stlink.cfg new file mode 100755 index 000000000..55208b762 --- /dev/null +++ b/radio/src/targets/stm32f2x_stlink.cfg @@ -0,0 +1,20 @@ +# +# STM32f2x stlink pseudo target +# + +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f2x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x2ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x10000 +} + +source [find stm32_stlink.cfg] + +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME stm32f2x 0 0 0 0 $_TARGETNAME diff --git a/radio/src/targets/stm32f4x_stlink.cfg b/radio/src/targets/stm32f4x_stlink.cfg new file mode 100755 index 000000000..f6dd926d7 --- /dev/null +++ b/radio/src/targets/stm32f4x_stlink.cfg @@ -0,0 +1,42 @@ +################################################################################ +## +## Copyright (C) 2008-2012 The openOCD Project +## +## This file is part of openOCD. +## +## openOCD is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the Free +## Software Foundation; either version 2 of the License, or (at your option) +## any later version. +## +## openOCD is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, write to the Free Software Foundation, Inc., 59 Temple +## Place, Suite 330, Boston, MA 02111-1307 USA +## +################################################################################ +# +# STM32f4x stlink pseudo target +# + +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f4x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x2ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x10000 +} + +source [find target/stm32_stlink.cfg] + +# stm32f4x family uses stm32f2x driver +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME stm32f2x 0 0 0 0 $_TARGETNAME