You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2019/12/05 09:10:47 UTC
[mynewt-core] 04/06: bsp: stm32l152discovery: move scripts to stlink
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 281ab03d21ee6f2c67c097c589d2b15d49c36e00
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Wed Dec 4 09:20:43 2019 -0300
bsp: stm32l152discovery: move scripts to stlink
---
hw/bsp/stm32l152discovery/stm32l152discovery_debug.sh | 8 +++-----
hw/bsp/stm32l152discovery/stm32l152discovery_download.sh | 6 ++----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/bsp/stm32l152discovery/stm32l152discovery_debug.sh b/hw/bsp/stm32l152discovery/stm32l152discovery_debug.sh
index 7ff33be..7e28b85 100755
--- a/hw/bsp/stm32l152discovery/stm32l152discovery_debug.sh
+++ b/hw/bsp/stm32l152discovery/stm32l152discovery_debug.sh
@@ -27,11 +27,9 @@
# - RESET set if target should be reset when attaching
# - NO_GDB set if we should not start gdb to debug
#
-. $CORE_PATH/hw/scripts/openocd.sh
+
+. $CORE_PATH/hw/scripts/stlink.sh
FILE_NAME=$BIN_BASENAME.elf
-CFG="-s $BSP_PATH -f $BSP_PATH/l152discovery.cfg"
-# Exit openocd when gdb detaches.
-EXTRA_JTAG_CMD="$EXTRA_JTAG_CMD; stm32l1.cpu configure -event gdb-detach {if {[stm32l1.cpu curstate] eq \"halted\"} resume;shutdown}"
-openocd_debug
+stlink_debug
diff --git a/hw/bsp/stm32l152discovery/stm32l152discovery_download.sh b/hw/bsp/stm32l152discovery/stm32l152discovery_download.sh
index 083b214..5d6d649 100755
--- a/hw/bsp/stm32l152discovery/stm32l152discovery_download.sh
+++ b/hw/bsp/stm32l152discovery/stm32l152discovery_download.sh
@@ -28,14 +28,12 @@
# - MFG_IMAGE is "1" if this is a manufacturing image
# - FLASH_OFFSET contains the flash offset to download to
# - BOOT_LOADER is set if downloading a bootloader
-. $CORE_PATH/hw/scripts/openocd.sh
-CFG="-s $BSP_PATH -f l152discovery.cfg"
+. $CORE_PATH/hw/scripts/stlink.sh
if [ "$MFG_IMAGE" ]; then
FLASH_OFFSET=0x08000000
fi
common_file_to_load
-openocd_load
-openocd_reset_run
+stlink_load