Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload: Fix mbed_adjust_upload_debug_commands for multiple targets #391

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tools/cmake/UploadMethodManager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
# NOTE: Place at the very start so that it can override by the below loaded
# upload method if need be.
function(mbed_adjust_upload_debug_commands target)
# MBED_UPLOAD_LAUNCH_COMMANDS defined?
if(NOT DEFINED MBED_UPLOAD_LAUNCH_COMMANDS)
# MBED_UPLOAD_LAUNCH_COMMANDS_BAK = first version of MBED_UPLOAD_LAUNCH_COMMANDS
if(DEFINED MBED_UPLOAD_LAUNCH_COMMANDS_BAK)
# Need first version for fresh adjust
set(MBED_UPLOAD_LAUNCH_COMMANDS ${MBED_UPLOAD_LAUNCH_COMMANDS_BAK})
elseif(DEFINED MBED_UPLOAD_LAUNCH_COMMANDS)
# No FORCE for saving first version only
set(MBED_UPLOAD_LAUNCH_COMMANDS_BAK ${MBED_UPLOAD_LAUNCH_COMMANDS} CACHE INTERNAL "")
else()
return()
endif()

Expand Down