From fbf692a076b8e7e8abee88cac96013bcf99e8c85 Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Tue, 20 Aug 2024 16:17:30 +0800 Subject: [PATCH] Upload: PyOCD: Honor OUTPUT_EXT for flash In PyOCD flash, if OUTPUT_EXT is defined in targets.json5, use image file with this extension . for flash, or default to .bin. --- tools/cmake/upload_methods/UploadMethodPYOCD.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)