Skip to content

Commit

Permalink
Upload: OpenOCD: Honor OUTPUT_EXT for flash (#330)
Browse files Browse the repository at this point in the history
In OpenOCD flash, if OUTPUT_EXT is defined in targets.json5, use image
file with this extension <target>.<OUTPUT_EXT> for flash, or default
to <target>.elf.
  • Loading branch information
ccli8 authored Aug 23, 2024
1 parent 88de6a1 commit 778ecaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cmake/upload_methods/UploadMethodOPENOCD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function(gen_upload_target TARGET_NAME BIN_FILE)
${OPENOCD_CHIP_CONFIG_COMMANDS}
${OPENOCD_ADAPTER_SERIAL_COMMAND}
-c "gdb_port disabled" # Don't start a GDB server when just programming
-c "program $<TARGET_FILE:${TARGET_NAME}> reset exit"
-c "program $<IF:$<BOOL:${MBED_OUTPUT_EXT}>,${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_BASE_NAME:${TARGET_NAME}>.${MBED_OUTPUT_EXT},$<TARGET_FILE:${TARGET_NAME}>> reset exit"
VERBATIM)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
Expand Down

0 comments on commit 778ecaf

Please sign in to comment.