Skip to content

CMake: refactor Samsung targets #14276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions targets/TARGET_Samsung/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("SIDK_S1SBP6A" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_SIDK_S1SBP6A)
elseif("SIDK_S5JS100" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_SIDK_S5JS100)
endif()
add_subdirectory(TARGET_SIDK_S1SBP6A EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_SIDK_S5JS100 EXCLUDE_FROM_ALL)

8 changes: 5 additions & 3 deletions targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_s1sbp6a.S)
endif()

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

target_include_directories(mbed-core
target_include_directories(mbed-s1sbp6a
INTERFACE
.
device
)

target_sources(mbed-core
target_sources(mbed-s1sbp6a
INTERFACE
PeripheralPins.c
flash_api.c
Expand All @@ -42,3 +42,5 @@ target_sources(mbed-core

${STARTUP_FILE}
)

mbed_set_linker_script(mbed-s1sbp6a ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
10 changes: 7 additions & 3 deletions targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_sidk_s5js100.S)
endif()

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

target_include_directories(mbed-core
target_include_directories(mbed-s5js100
INTERFACE
.
device
Expand All @@ -20,7 +20,7 @@ target_include_directories(mbed-core
security_subsystem/drivers
)

target_sources(mbed-core
target_sources(mbed-s5js100
INTERFACE
gpio_api.c
gpio_irq_api.c
Expand Down Expand Up @@ -61,3 +61,7 @@ target_sources(mbed-core

${STARTUP_FILE}
)

mbed_set_linker_script(mbed-s5js100 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

target_link_libraries(mbed-s5js100)