File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,20 @@ function(mbed_set_toolchain_options target)
53
53
TOOLCHAIN_ARM
54
54
)
55
55
56
+ list (APPEND link_options
57
+ "${MBED_STUDIO_ARM_COMPILER} "
58
+ )
59
+
60
+ # Add linking time preprocessor macro for TFM targets
61
+ if (MBED_CPU_CORE MATCHES "\- NS$" )
62
+ list (APPEND link_options
63
+ "--predefine=\" -DDOMAIN_NS=0x1\" "
64
+ )
65
+ endif ()
66
+
56
67
target_link_options (${target}
57
68
PUBLIC
58
- ${MBED_STUDIO_ARM_COMPILER }
69
+ ${link_options }
59
70
)
60
71
endfunction ()
61
72
Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ function(mbed_set_toolchain_options target)
23
23
"-T" "${CMAKE_BINARY_DIR} /${APP_TARGET} .link_script.ld"
24
24
)
25
25
26
+ # Add linking time preprocessor macro for TFM targets
27
+ if ("TFM" IN_LIST MBED_TARGET_LABELS )
28
+ list (APPEND link_options
29
+ "-DDOMAIN_NS=1"
30
+ )
31
+ endif ()
32
+
26
33
list (APPEND common_options
27
34
"-Wall"
28
35
"-Wextra"
@@ -49,6 +56,7 @@ function(mbed_set_toolchain_options target)
49
56
TOOLCHAIN_GCC
50
57
)
51
58
59
+
52
60
target_link_options (${target}
53
61
PUBLIC
54
62
${common_options}
You can’t perform that action at this time.
0 commit comments