diff --git a/tools/cmake/UploadMethodManager.cmake b/tools/cmake/UploadMethodManager.cmake index ae9784263e..145cba01d5 100644 --- a/tools/cmake/UploadMethodManager.cmake +++ b/tools/cmake/UploadMethodManager.cmake @@ -46,7 +46,10 @@ set(MBED_UPLOAD_SUPPORTS_DEBUG ${UPLOAD_SUPPORTS_DEBUG} CACHE INTERNAL "" FORCE) function(mbed_generate_upload_debug_targets target) # add upload target - gen_upload_target(${target} ${CMAKE_CURRENT_BINARY_DIR}/${target}.bin ${CMAKE_CURRENT_BINARY_DIR}/${target}.hex) + gen_upload_target(${target} + ${CMAKE_CURRENT_BINARY_DIR}/$.bin + ${CMAKE_CURRENT_BINARY_DIR}/$.hex + ) # add debug target if(MBED_UPLOAD_SUPPORTS_DEBUG) diff --git a/tools/cmake/mbed_set_post_build.cmake b/tools/cmake/mbed_set_post_build.cmake index 86f83e915f..d33ba00ca7 100644 --- a/tools/cmake/mbed_set_post_build.cmake +++ b/tools/cmake/mbed_set_post_build.cmake @@ -6,12 +6,8 @@ # function(mbed_generate_bin_hex target) get_property(elf_to_bin GLOBAL PROPERTY ELF2BIN) - get_target_property(artifact_name ${target} ARTIFACT_NAME) - # set to the target name if the property is unset - if(artifact_name STREQUAL "artifact_name-NOTFOUND" OR artifact_name STREQUAL "") - set(artifact_name ${target}) - endif() + set(artifact_name $) if (MBED_TOOLCHAIN STREQUAL "GCC_ARM") # The first condition is quoted in case MBED_OUTPUT_EXT is unset