mirror of https://github.com/ARMmbed/mbed-os.git
Rebase linker script change properly, re-add external toolchain file support
parent
f07c0cd7e6
commit
0972738e46
|
@ -54,7 +54,6 @@ endif()
|
|||
|
||||
mbed_set_cpu_core_definitions(mbed-core)
|
||||
if(${MBED_TOOLCHAIN_FILE_USED})
|
||||
mbed_set_toolchain_options(mbed-core)
|
||||
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN})
|
||||
mbed_set_c_lib(mbed-core ${MBED_C_LIB})
|
||||
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
|
||||
|
@ -134,7 +133,7 @@ function(mbed_set_mbed_target_linker_script target)
|
|||
if(MBED_TOOLCHAIN STREQUAL "GCC_ARM")
|
||||
set(CMAKE_PRE_BUILD_COMMAND
|
||||
COMMAND "arm-none-eabi-cpp" ${_linker_preprocess_definitions} -x assembler-with-cpp -E -Wp,-P
|
||||
${mbed_target_linker_script} -o ${CMAKE_BINARY_DIR}/${APP_NAME}.link_script.ld
|
||||
${mbed_target_linker_script} -o ${CMAKE_BINARY_DIR}/${target}.link_script.ld
|
||||
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
BYPRODUCTS "${CMAKE_BINARY_DIR}/${target}.link_script.ld"
|
||||
|
|
|
@ -10,8 +10,10 @@ endif()
|
|||
include(${MBED_CONFIG_PATH}/mbed_config.cmake)
|
||||
|
||||
# Load toolchain file
|
||||
set(MBED_TOOLCHAIN_FILE_USED TRUE CACHE INTERNAL "")
|
||||
include(${MBED_PATH}/tools/cmake/toolchain.cmake)
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE OR MBED_TOOLCHAIN_FILE_USED)
|
||||
set(MBED_TOOLCHAIN_FILE_USED TRUE CACHE INTERNAL "")
|
||||
include(${MBED_PATH}/tools/cmake/toolchain.cmake)
|
||||
endif()
|
||||
|
||||
# Specify available build profiles and add options for the selected build profile
|
||||
include(${MBED_PATH}/tools/cmake/profile.cmake)
|
||||
|
|
|
@ -37,13 +37,11 @@ list(APPEND link_options
|
|||
|
||||
# Add linking time preprocessor macro for TFM targets
|
||||
if(MBED_CPU_CORE MATCHES "-NS$")
|
||||
)
|
||||
list(APPEND link_options
|
||||
"--predefine=\"-DDOMAIN_NS=0x1\""
|
||||
)
|
||||
endif()
|
||||
|
||||
function(mbed_set_toolchain_options target)
|
||||
# blank for ARMClang
|
||||
endfunction()
|
||||
|
||||
# Configure the toolchain to select the selected C library
|
||||
function(mbed_set_c_lib target lib_type)
|
||||
if (${lib_type} STREQUAL "small")
|
||||
|
|
|
@ -7,11 +7,6 @@ set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")
|
|||
set(GCC_ELF2BIN "arm-none-eabi-objcopy")
|
||||
set_property(GLOBAL PROPERTY ELF2BIN ${GCC_ELF2BIN})
|
||||
|
||||
# Sets toolchain options for a target
|
||||
function(mbed_set_toolchain_options target)
|
||||
|
||||
endfunction(mbed_set_toolchain_options)
|
||||
|
||||
# build toolchain flags that get passed to everything (including CMake compiler checks)
|
||||
list(APPEND link_options
|
||||
"-Wl,--start-group"
|
||||
|
|
Loading…
Reference in New Issue