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/01/04 14:08:22 UTC

[mynewt-core] branch master updated: Use stlink tooling for stm32l4

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


The following commit(s) were added to refs/heads/master by this push:
     new ee5ab94  Use stlink tooling for stm32l4
ee5ab94 is described below

commit ee5ab94aaf7d0556cf40ee8f78f078210cf88a92
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 3 11:41:37 2019 -0200

    Use stlink tooling for stm32l4
    
    As reported previously, openocd 0.10.0 and git master have changed the
    script name about one year ago which forces users to have to edit the
    configuration files according to the openocd version they have
    installed. This switches to more friendly st-link based tooling which
    has more regular releases and does auto-detect the stm32 line MCU in
    use.
    
    Signed-off-by: Fabio Utzig <ut...@apache.org>
---
 hw/bsp/nucleo-l476rg/nucleo-l476rg_debug.sh    | 7 ++-----
 hw/bsp/nucleo-l476rg/nucleo-l476rg_download.sh | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/hw/bsp/nucleo-l476rg/nucleo-l476rg_debug.sh b/hw/bsp/nucleo-l476rg/nucleo-l476rg_debug.sh
index f514523..8445f23 100755
--- a/hw/bsp/nucleo-l476rg/nucleo-l476rg_debug.sh
+++ b/hw/bsp/nucleo-l476rg/nucleo-l476rg_debug.sh
@@ -27,11 +27,8 @@
 #  - 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="-f board/st_nucleo_l4.cfg"
-# Exit openocd when gdb detaches.
-EXTRA_JTAG_CMD="$EXTRA_JTAG_CMD; stm32l4x.cpu configure -event gdb-detach {if {[stm32l4x.cpu curstate] eq \"halted\"} resume;shutdown}"
 
-openocd_debug
+stlink_debug
diff --git a/hw/bsp/nucleo-l476rg/nucleo-l476rg_download.sh b/hw/bsp/nucleo-l476rg/nucleo-l476rg_download.sh
index 820c90b..5d6d649 100755
--- a/hw/bsp/nucleo-l476rg/nucleo-l476rg_download.sh
+++ b/hw/bsp/nucleo-l476rg/nucleo-l476rg_download.sh
@@ -29,14 +29,11 @@
 #  - FLASH_OFFSET contains the flash offset to download to
 #  - BOOT_LOADER is set if downloading a bootloader
 
-. $CORE_PATH/hw/scripts/openocd.sh
-
-CFG="-f board/st_nucleo_l4.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