Skip to content

Commit 3ef0353

Browse files
authored
Merge pull request #14276 from harmut01/refactor_samsung
CMake: refactor Samsung targets
2 parents ba1e7b5 + 1282242 commit 3ef0353

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

targets/TARGET_Samsung/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("SIDK_S1SBP6A" IN_LIST MBED_TARGET_LABELS)
5-
add_subdirectory(TARGET_SIDK_S1SBP6A)
6-
elseif("SIDK_S5JS100" IN_LIST MBED_TARGET_LABELS)
7-
add_subdirectory(TARGET_SIDK_S5JS100)
8-
endif()
4+
add_subdirectory(TARGET_SIDK_S1SBP6A EXCLUDE_FROM_ALL)
5+
add_subdirectory(TARGET_SIDK_S5JS100 EXCLUDE_FROM_ALL)
6+

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
99
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_s1sbp6a.S)
1010
endif()
1111

12-
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
12+
add_library(mbed-s1sbp6a INTERFACE)
1313

14-
target_include_directories(mbed-core
14+
target_include_directories(mbed-s1sbp6a
1515
INTERFACE
1616
.
1717
device
1818
)
1919

20-
target_sources(mbed-core
20+
target_sources(mbed-s1sbp6a
2121
INTERFACE
2222
PeripheralPins.c
2323
flash_api.c
@@ -42,3 +42,5 @@ target_sources(mbed-core
4242

4343
${STARTUP_FILE}
4444
)
45+
46+
mbed_set_linker_script(mbed-s1sbp6a ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
99
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_sidk_s5js100.S)
1010
endif()
1111

12-
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
12+
add_library(mbed-s5js100 INTERFACE)
1313

14-
target_include_directories(mbed-core
14+
target_include_directories(mbed-s5js100
1515
INTERFACE
1616
.
1717
device
@@ -20,7 +20,7 @@ target_include_directories(mbed-core
2020
security_subsystem/drivers
2121
)
2222

23-
target_sources(mbed-core
23+
target_sources(mbed-s5js100
2424
INTERFACE
2525
gpio_api.c
2626
gpio_irq_api.c
@@ -61,3 +61,7 @@ target_sources(mbed-core
6161

6262
${STARTUP_FILE}
6363
)
64+
65+
mbed_set_linker_script(mbed-s5js100 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
66+
67+
target_link_libraries(mbed-s5js100)

0 commit comments

Comments
 (0)