diff --git a/miosix/cmake/LinkTarget.cmake b/miosix/cmake/LinkTarget.cmake index 63b29ffd7..98f104286 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 write 0x8000000) endif() list(TRANSFORM PROGRAM_CMDLINE REPLACE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.bin)