Skip to content

Commit f07c588

Browse files
Don't require memory banks if not using an upload method
1 parent 3ffd182 commit f07c588

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/cmake/UploadMethodManager.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ if(NOT DEFINED MBED_UPLOAD_BASE_ADDR OR "${MBED_UPLOAD_BASE_ADDR}" STREQUAL "")
4343
if(MBED_CONFIG_DEFINITIONS MATCHES "MBED_CONFIGURED_ROM_START=(0x[0-9a-zA-Z]+)")
4444
set(MBED_UPLOAD_BASE_ADDR ${CMAKE_MATCH_1} CACHE STRING ${BASE_ADDR_DESCRIPTION})
4545
else()
46-
set(MBED_UPLOAD_BASE_ADDR "" CACHE STRING ${BASE_ADDR_DESCRIPTION})
47-
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.")
46+
if(NOT ${UPLOAD_METHOD} STREQUAL "NONE")
47+
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.")
48+
endif()
4849
endif()
4950
endif()
5051

0 commit comments

Comments
 (0)