diff --git a/tools/cmake/upload_methods/UploadMethodPYOCD.cmake b/tools/cmake/upload_methods/UploadMethodPYOCD.cmake index 61f67cbc62a..d5e91a31537 100644 --- a/tools/cmake/upload_methods/UploadMethodPYOCD.cmake +++ b/tools/cmake/upload_methods/UploadMethodPYOCD.cmake @@ -36,7 +36,7 @@ function(gen_upload_target TARGET_NAME BIN_FILE) -f ${PYOCD_CLOCK_SPEED} -t ${PYOCD_TARGET_NAME} ${PYOCD_PROBE_ARGS} - ${BIN_FILE}) + $,${CMAKE_CURRENT_BINARY_DIR}/$.${MBED_OUTPUT_EXT},${BIN_FILE}>) add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) endfunction(gen_upload_target)