File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ endif()
54
54
55
55
mbed_set_cpu_core_definitions (mbed-core )
56
56
if (${MBED_TOOLCHAIN_FILE_USED} )
57
- mbed_set_toolchain_options (mbed-core )
58
57
mbed_set_profile_options (mbed-core ${MBED_TOOLCHAIN} )
59
58
mbed_set_c_lib (mbed-core ${MBED_C_LIB} )
60
59
mbed_set_printf_lib (mbed-core ${MBED_PRINTF_LIB} )
@@ -134,7 +133,7 @@ function(mbed_set_mbed_target_linker_script target)
134
133
if (MBED_TOOLCHAIN STREQUAL "GCC_ARM" )
135
134
set (CMAKE_PRE_BUILD_COMMAND
136
135
COMMAND "arm-none-eabi-cpp" ${_linker_preprocess_definitions} -x assembler-with-cpp -E -Wp,-P
137
- ${mbed_target_linker_script} -o ${CMAKE_BINARY_DIR} /${APP_NAME }.link_script.ld
136
+ ${mbed_target_linker_script} -o ${CMAKE_BINARY_DIR} /${target }.link_script.ld
138
137
139
138
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
140
139
BYPRODUCTS "${CMAKE_BINARY_DIR} /${target} .link_script.ld"
Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ endif()
10
10
include (${MBED_CONFIG_PATH} /mbed_config.cmake )
11
11
12
12
# Load toolchain file
13
- set (MBED_TOOLCHAIN_FILE_USED TRUE CACHE INTERNAL "" )
14
- include (${MBED_PATH} /tools/cmake/toolchain.cmake )
13
+ if (NOT CMAKE_TOOLCHAIN_FILE OR MBED_TOOLCHAIN_FILE_USED )
14
+ set (MBED_TOOLCHAIN_FILE_USED TRUE CACHE INTERNAL "" )
15
+ include (${MBED_PATH} /tools/cmake/toolchain.cmake )
16
+ endif ()
15
17
16
18
# Specify available build profiles and add options for the selected build profile
17
19
include (${MBED_PATH} /tools/cmake/profile.cmake )
Original file line number Diff line number Diff line change @@ -37,13 +37,11 @@ list(APPEND link_options
37
37
38
38
# Add linking time preprocessor macro for TFM targets
39
39
if (MBED_CPU_CORE MATCHES "-NS$" )
40
- )
40
+ list (APPEND link_options
41
+ "--predefine=\" -DDOMAIN_NS=0x1\" "
42
+ )
41
43
endif ()
42
44
43
- function (mbed_set_toolchain_options target )
44
- # blank for ARMClang
45
- endfunction ()
46
-
47
45
# Configure the toolchain to select the selected C library
48
46
function (mbed_set_c_lib target lib_type )
49
47
if (${lib_type} STREQUAL "small" )
Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")
7
7
set (GCC_ELF2BIN "arm-none-eabi-objcopy" )
8
8
set_property (GLOBAL PROPERTY ELF2BIN ${GCC_ELF2BIN} )
9
9
10
- # Sets toolchain options for a target
11
- function (mbed_set_toolchain_options target )
12
-
13
- endfunction (mbed_set_toolchain_options )
14
-
15
10
# build toolchain flags that get passed to everything (including CMake compiler checks)
16
11
list (APPEND link_options
17
12
"-Wl,--start-group"
You can’t perform that action at this time.
0 commit comments