File tree Expand file tree Collapse file tree 4 files changed +44
-13
lines changed
boards/risc-v/k230/canmv230 Expand file tree Collapse file tree 4 files changed +44
-13
lines changed Original file line number Diff line number Diff line change @@ -758,8 +758,14 @@ if(CONFIG_BUILD_PROTECTED)
758
758
OUTPUT_VARIABLE nuttx_user_libgcc )
759
759
760
760
# reset link options for userspace to prevent sections from being accidentally
761
- # deleted
762
- set_target_properties (nuttx_user PROPERTIES LINK_OPTIONS "" )
761
+ # deleted Toolchain link options
762
+ get_target_property (nuttx_user_LINK_OPTIONS nuttx_user LINK_OPTIONS )
763
+ list (REMOVE_ITEM nuttx_user_LINK_OPTIONS "-Wl,--gc-sections" )
764
+ list (REMOVE_ITEM nuttx_user_LINK_OPTIONS "-Wl,--cref" )
765
+ list (REMOVE_ITEM nuttx_user_LINK_OPTIONS "-Wl,-Map=nuttx.map" )
766
+ list (REMOVE_ITEM nuttx_user_LINK_OPTIONS "-Wl,--entry=__start" )
767
+ set_target_properties (nuttx_user PROPERTIES LINK_OPTIONS
768
+ "${nuttx_user_LINK_OPTIONS} " )
763
769
764
770
target_link_options (
765
771
nuttx_user PRIVATE -nostartfiles -nodefaultlibs
Original file line number Diff line number Diff line change 19
19
# ##############################################################################
20
20
21
21
add_subdirectory (src )
22
+
23
+ if (CONFIG_BUILD_PROTECTED )
24
+ add_subdirectory (kernel )
25
+ set_property (
26
+ GLOBAL PROPERTY LD_SCRIPT_USER
27
+ ${CMAKE_CURRENT_LIST_DIR} /scripts/ld-userland.script )
28
+ endif ()
Original file line number Diff line number Diff line change
1
+ # ##############################################################################
2
+ # boards/risc-v/k230/canmv230/kernel/CMakeLists.txt
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more contributor
5
+ # license agreements. See the NOTICE file distributed with this work for
6
+ # additional information regarding copyright ownership. The ASF licenses this
7
+ # file to you under the Apache License, Version 2.0 (the "License"); you may not
8
+ # use this file except in compliance with the License. You may obtain a copy of
9
+ # the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations under
17
+ # the License.
18
+ #
19
+ # ##############################################################################
20
+
21
+ target_link_options (nuttx_user PRIVATE "-Wl,-melf64lriscv" )
22
+
23
+ target_sources (nuttx_user PRIVATE k230_userspace.c )
Original file line number Diff line number Diff line change @@ -29,26 +29,21 @@ set(SRCS
29
29
lib_psa_getschedparam.c
30
30
lib_psa_getschedpolicy.c
31
31
lib_psa_init.c
32
- lib_psa_destroy.c
33
32
lib_psa_setflags.c
34
33
lib_psa_setschedparam.c
35
34
lib_psa_setschedpolicy.c
36
35
lib_psa_getsigmask.c
37
- lib_psa_setsigmask.c )
38
-
39
- if (CONFIG_DEBUG_FEATURES )
40
- list (APPEND SRCS lib_psfa_dump.c )
41
- endif ()
36
+ lib_psa_setsigmask.c
37
+ lib_psa_getstacksize.c
38
+ lib_psa_setstacksize.c
39
+ lib_psa_destroy.c )
42
40
43
41
if (NOT CONFIG_BUILD_KERNEL )
44
- list (APPEND SRCS lib_psa_getstacksize.c lib_psa_setstacksize.c )
45
- if (CONFIG_LIB_SYSCALL )
46
- list (APPEND SRCS lib_task_spawn.c )
47
- endif ()
42
+ list (APPEND SRCS lib_psa_getstackaddr.c lib_psa_setstackaddr.c )
48
43
endif ()
49
44
50
45
if (CONFIG_DEBUG_FEATURES )
51
- list (APPEND SRCS lib_psa_dump.c )
46
+ list (APPEND SRCS lib_psfa_dump.c lib_psa_dump.c )
52
47
endif ()
53
48
54
49
target_sources (c PRIVATE ${SRCS} )
You can’t perform that action at this time.
0 commit comments