From f07c588cf44b956e229066a33a0264416169f637 Mon Sep 17 00:00:00 2001 From: Jamie Smith Date: Fri, 4 Oct 2024 00:24:07 -0700 Subject: [PATCH] Don't require memory banks if not using an upload method --- tools/cmake/UploadMethodManager.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/cmake/UploadMethodManager.cmake b/tools/cmake/UploadMethodManager.cmake index 09d00f3d9d1..a52093b6d2c 100644 --- a/tools/cmake/UploadMethodManager.cmake +++ b/tools/cmake/UploadMethodManager.cmake @@ -43,8 +43,9 @@ if(NOT DEFINED MBED_UPLOAD_BASE_ADDR OR "${MBED_UPLOAD_BASE_ADDR}" STREQUAL "") if(MBED_CONFIG_DEFINITIONS MATCHES "MBED_CONFIGURED_ROM_START=(0x[0-9a-zA-Z]+)") set(MBED_UPLOAD_BASE_ADDR ${CMAKE_MATCH_1} CACHE STRING ${BASE_ADDR_DESCRIPTION}) else() - set(MBED_UPLOAD_BASE_ADDR "" CACHE STRING ${BASE_ADDR_DESCRIPTION}) - message(FATAL_ERROR "Since no ROM banks have been defined, you need to set the MBED_UPLOAD_BASE_ADDR option so we know where to upload code. NOTE: If you upgraded from an old version of Mbed CE and are getting this error, delete and reconfigure your CMake build directory.") + if(NOT ${UPLOAD_METHOD} STREQUAL "NONE") + message(FATAL_ERROR "Since no ROM banks have been defined, you need to set the MBED_UPLOAD_BASE_ADDR option so we know where to upload code. NOTE: If you upgraded from an old version of Mbed CE and are getting this error, delete and reconfigure your CMake build directory.") + endif() endif() endif()