From 1a72aab6ffba3cb00aaeaaacca32e1b50ce991dc Mon Sep 17 00:00:00 2001 From: Alberto Nidasio Date: Tue, 18 Jun 2024 16:59:56 +0200 Subject: [PATCH] Changed default `st-flash` command flags --- .../stm32f407vg_stm32f4discovery/CMakeLists.txt | 2 +- .../stm32f429zi_stm32f4discovery/CMakeLists.txt | 2 +- miosix/cmake/LinkTarget.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/miosix/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/CMakeLists.txt b/miosix/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/CMakeLists.txt index 776eef018..b4ff3ab14 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/CMakeLists.txt +++ b/miosix/arch/cortexM4_stm32f4/stm32f407vg_stm32f4discovery/CMakeLists.txt @@ -80,4 +80,4 @@ list(APPEND CXXFLAGS_BASE -D_BOARD_STM32F4DISCOVERY) # built. Use or as placeolders, they will be replaced by the # build systems with the binary or hex file path repectively. # If a command is not specified, the build system will fallback to st-flash -set(PROGRAM_CMDLINE qstlink2 -cqewV ) +# set(PROGRAM_CMDLINE st-flash --connect-under-reset --reset write 0x0000000) diff --git a/miosix/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/CMakeLists.txt b/miosix/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/CMakeLists.txt index 0b69f05cb..d4880448f 100644 --- a/miosix/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/CMakeLists.txt +++ b/miosix/arch/cortexM4_stm32f4/stm32f429zi_stm32f4discovery/CMakeLists.txt @@ -87,4 +87,4 @@ list(APPEND CXXFLAGS_BASE -D_BOARD_STM32F429ZI_STM32F4DISCOVERY) # built. Use or as placeolders, they will be replaced by the # build systems with the binary or hex file path repectively. # If a command is not specified, the build system will fallback to st-flash -set(PROGRAM_CMDLINE qstlink2 -cqewV ) +# set(PROGRAM_CMDLINE st-flash --connect-under-reset --reset write 0x0000000) diff --git a/miosix/cmake/LinkTarget.cmake b/miosix/cmake/LinkTarget.cmake index 63b29ffd7..f8d6582ec 100644 --- a/miosix/cmake/LinkTarget.cmake +++ b/miosix/cmake/LinkTarget.cmake @@ -27,7 +27,7 @@ function(miosix_add_program_target TARGET) get_target_property(PROGRAM_CMDLINE miosix PROGRAM_CMDLINE) if(PROGRAM_CMDLINE STREQUAL "PROGRAM_CMDLINE-NOTFOUND") - set(PROGRAM_CMDLINE st-flash --reset write 0x8000000) + set(PROGRAM_CMDLINE st-flash --connect-under-reset --reset write 0x0000000) endif() list(TRANSFORM PROGRAM_CMDLINE REPLACE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.bin)