From 4b7cc95529b7df54a8a18483d226c6911aa5f87c Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Thu, 22 Jan 2015 16:53:14 +0100 Subject: [PATCH] boards/nucleo-l1: check presence of stm32l.cfg In current updates OpenOCD split up stm32l.cfg into stm32l1.cfg and stm32l0.cfg. This provides a check in openocd.cfg for this file so openocd doesn't fail. --- boards/nucleo-l1/dist/openocd.cfg | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/boards/nucleo-l1/dist/openocd.cfg b/boards/nucleo-l1/dist/openocd.cfg index a2348de15..e9322e255 100644 --- a/boards/nucleo-l1/dist/openocd.cfg +++ b/boards/nucleo-l1/dist/openocd.cfg @@ -3,4 +3,16 @@ source [find interface/stlink-v2-1.cfg] transport select hla_swd -source [find target/stm32l.cfg] +# during development of openocd the existing configuration +# for this board's MCU got renamed. This tries to test against +# the different versions. +# See https://github.com/RIOT-OS/RIOT/pull/2343 +# Should be obsolete with http://openocd.zylin.com/#/c/2489/ + +if [catch {find target/stm32l.cfg}] { + source [find target/stm32l1.cfg] + reset_config srst_only +} else { + source [find target/stm32l.cfg] + reset_config srst_only srst_nogate +}