Skip to content
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
2 changes: 2 additions & 0 deletions targets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ elseif("NORDIC" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NORDIC)
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NUVOTON)
elseif("Samsung" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_Samsung)
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_Silicon_Labs)
elseif("STM" IN_LIST MBED_TARGET_LABELS)
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_Samsung/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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()
44 changes: 44 additions & 0 deletions targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/s1sbp6a.sct)
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_s1sbp6a.S)
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/s1sbp6a.ld)
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})

target_include_directories(mbed-core
INTERFACE
.
device
)

target_sources(mbed-core
INTERFACE
PeripheralPins.c
flash_api.c
gpio_api.c
gpio_irq_api.c
i2c_api.c
pinmap.c
rtc_api.c
serial_api.c
sleep_api.c
spi_api.c
us_ticker.c
watchdog_api.c

device/s1sbp6a_cmu.c
device/s1sbp6a_gpio.c
device/s1sbp6a_i2c.c
device/s1sbp6a_pmu.c
device/s1sbp6a_rtc.c
device/s1sbp6a_wdog.c
device/system_s1sbp6a.c

${STARTUP_FILE}
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! armcc -E
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
;* Copyright (c) 2006-2019 ARM Limited
;* All rights reserved.
;* SPDX-License-Identifier: Apache-2.0
Expand Down
71 changes: 71 additions & 0 deletions targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/sidk_s5js100.sct)
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_sidk_s5js100.S)
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/sidk_s5js100.ld)
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})

target_include_directories(mbed-core
INTERFACE
.
device
modem
security_subsystem
security_subsystem/drivers
)

target_sources(mbed-core
INTERFACE
# TODO CMAKE: The files commented below trigger a dependency on other libraries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've missed this one. I created #14025 to track this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pan- is aware of this and has raised the issue with @ARMmbed/team-samsung.

# they should be moved somewhere in the connectivity directory.
# dcxo_update.cpp
# mbed_main_init.cpp
# modem/modem_io_device.cpp
# modem/modem_link_device_shmem.cpp
# modem/s5js100_mbox_ipc.cpp
# modem/shmem_save.cpp
gpio_api.c
gpio_irq_api.c
i2c_api.c

mbed_sdk_init.c
pinmap.c
rtc_api.c
s5js100_dcxo.cpp
s5js100_pmip.c
s5js100_pwr.c
s5js100_watchdog.c
security_subsystem
serial_api.c
serial_dummy_api.c
serial_pl011_api.c
serial_usi_api.c
sleep.c
spi_api.c
us_ticker.c
watchdog_api.c

device/s5js100_pwrcal.c
device/s5js100_systemreset.c
device/sflash_api.cpp
device/system_core_s5js100.c
device/system_core_version.c
device/system_s5js100.c

security_subsystem/api/trng_api.c

security_subsystem/drivers/mb_cmd_hash.c
security_subsystem/drivers/mb_cmd_rng.c
security_subsystem/drivers/mb_cmd_system.c
security_subsystem/drivers/sss_driver_rng.c
security_subsystem/drivers/sss_driver_sha2.c
security_subsystem/drivers/sss_driver_util.c

${STARTUP_FILE}
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! armcc -E
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m7
;/****************************************************************************
; *
; * Copyright 2020 Samsung Electronics All Rights Reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
#define S5JS100_BOOTMEM_BASE 0x00000000
extern uint32_t __vector_table;
extern uint32_t __Vectors_Size;
#elif defined (TOOLCHAIN_ARM_STD)/*__ARMCC_VERSION)*/
#elif defined(__ARMCC_VERSION)
#define S5JS100_BOOTMEM_BASE 0x00000000
extern uint32_t __Vectors;
extern uint32_t __Vectors_Size;
Expand Down Expand Up @@ -166,7 +166,7 @@ void SystemCoreConfig()
//*dest++ = *src++;
}

#elif defined (TOOLCHAIN_ARM_STD)/*__ARMCC_VERSION)*/
#elif defined(__ARMCC_VERSION)
src = (uint32_t *)&__Vectors;

dest = (uint32_t *)S5JS100_BOOTMEM_BASE;
Expand Down
1 change: 1 addition & 0 deletions tools/cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following targets are supported:
- Freescale targets
- GigaDevice targets
- MAXIM targets
- Samsung targets
- Silicon Labs targets
- STM targets

Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/cores/Cortex-M7.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(mbed_set_cpu_core_options target mbed_toolchain)
INTERFACE
$<$<COMPILE_LANGUAGE:C>:${compile_options}>
$<$<COMPILE_LANGUAGE:CXX>:${compile_options}>
$<$<COMPILE_LANGUAGE:ASM>:-mcpu=Cortex-M7.no_fp>
$<$<COMPILE_LANGUAGE:ASM>:${compile_options}>
)

target_link_options(${target}
Expand Down