Skip to content

Commit 293c237

Browse files
committed
added new bsp and arch
1 parent f53f039 commit 293c237

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

RTEMSConfig.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function(rtems_general_config TARGET_NAME RTEMS_INST RTEMS_BSP)
1212

1313
set(RTEMS_BSP_LIB_PATH CACHE INTERNAL "")
1414
set(RTEMS_BSP_INC_PATH CACHE INTERNAL "")
15+
set(RTEMS_ARCH_LIB_PATH CACHE INTERNAL "")
1516

1617
include(${RTEMS_CONFIG_DIRECTORY}/RTEMSGeneric.cmake)
1718
rtems_generic_config(${TARGET_NAME} ${RTEMS_INST} ${RTEMS_BSP})

RTEMSGeneric.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ list(GET RTEMS_BSP_LIST_SEPARATED 1 RTEMS_BSP_NAME)
3636
set(RTEMS_ARCH_TOOLS "${RTEMS_ARCH_NAME}-rtems${RTEMS_VERSION}")
3737

3838
if(IS_DIRECTORY "${RTEMS_INST}/${RTEMS_ARCH_TOOLS}")
39+
if(IS_DIRECTORY "${RTEMS_INST}/${RTEMS_ARCH_TOOLS}/lib")
40+
set(RTEMS_ARCH_LIB_PATH "${RTEMS_INST}/${RTEMS_ARCH_TOOLS}/lib" PARENT_SCOPE)
41+
endif()
3942
set(RTEMS_BSP_LIB_PATH "${RTEMS_INST}/${RTEMS_ARCH_TOOLS}/${RTEMS_BSP_NAME}/lib")
4043
if(NOT IS_DIRECTORY "${RTEMS_BSP_LIB_PATH}")
4144
message(FATAL_ERROR "RTEMS BSP lib folder not found at ${RTEMS_BSP_LIB_PATH}")

RTEMSHardware.cmake

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,38 @@ target_link_options(${TARGET_NAME} PUBLIC
3838
-B${RTEMS_BSP_LIB_PATH}
3939
)
4040

41+
elseif(RTEMS_BSP STREQUAL "sparc/erc32")
42+
43+
target_compile_options(${TARGET_NAME} PUBLIC
44+
-qrtems
45+
-B${RTEMS_ARCH_LIB_PATH}
46+
-B${RTEMS_BSP_LIB_PATH}
47+
--specs bsp_specs
48+
-mcpu=cypress
49+
-ffunction-sections
50+
-fdata-sections
51+
-Wall
52+
-Wmissing-prototypes
53+
-Wimplicit-function-declaration
54+
-Wstrict-prototypes
55+
-Wnested-externs
56+
-O2
57+
-g
58+
59+
)
60+
61+
target_link_options(${TARGET_NAME} PUBLIC
62+
-B${RTEMS_ARCH_LIB_PATH}
63+
-B${RTEMS_BSP_LIB_PATH}
64+
-qrtems
65+
--specs bsp_specs
66+
-Wl,--gc-sections
67+
-Wl,-Bstatic
68+
-Wl,-Bdynamic
69+
)
70+
4171
endif()
42-
endfunction()
72+
73+
74+
endfunction()
75+

0 commit comments

Comments
 (0)