Skip to content

Commit 470cc1a

Browse files
committed
CMake: Add support for Arm's CM3DS_MPS2 target
1 parent eff0d4c commit 470cc1a

File tree

4 files changed

+83
-1
lines changed

4 files changed

+83
-1
lines changed

targets/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ elseif("Analog_Devices" IN_LIST MBED_TARGET_LABELS)
77
add_subdirectory(TARGET_Analog_Devices)
88
elseif("ARM_FM" IN_LIST MBED_TARGET_LABELS)
99
add_subdirectory(TARGET_ARM_FM)
10+
elseif("ARM_SSG" IN_LIST MBED_TARGET_LABELS)
11+
add_subdirectory(TARGET_ARM_SSG)
1012
elseif("Cypress" IN_LIST MBED_TARGET_LABELS)
1113
add_subdirectory(TARGET_Cypress)
1214
elseif("Freescale" IN_LIST MBED_TARGET_LABELS)

targets/TARGET_ARM_SSG/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("CM3DS_MPS2" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_CM3DS_MPS2)
6+
elseif("MPS2" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_MPS2)
8+
elseif("MUSCA_B1" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_MUSCA_B1)
10+
elseif("MUSCA_S1" IN_LIST MBED_TARGET_LABELS)
11+
add_subdirectory(TARGET_MUSCA_S1)
12+
endif()
13+
14+
target_include_directories(mbed-core
15+
INTERFACE
16+
.
17+
)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
5+
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/MPS2.sct)
6+
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_MPS2.S)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
8+
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/MPS2.ld)
9+
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_MPS2.S)
10+
endif()
11+
12+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
13+
14+
target_include_directories(mbed-core
15+
INTERFACE
16+
.
17+
device
18+
device/drivers
19+
device/drivers/TZ-TRNG/host/src/tztrng_lib/include
20+
device/drivers/TZ-TRNG/shared/hw/include
21+
device/drivers/timer_cmsdk
22+
)
23+
24+
target_sources(mbed-core
25+
INTERFACE
26+
analogin_api.c
27+
cmsdk_ticker.c
28+
flash_api.c
29+
gpio_api.c
30+
gpio_irq_api.c
31+
i2c_api.c
32+
lp_ticker.c
33+
mbed_overrides.c
34+
pinmap.c
35+
port_api.c
36+
rtc_api.c
37+
serial_api.c
38+
sleep_api.c
39+
spi_api.c
40+
trng_api.c
41+
us_ticker.c
42+
43+
device/platform_devices.c
44+
device/system_CMSDK_CM3DS.c
45+
46+
device/drivers/arm_gpio_drv.c
47+
device/drivers/arm_mps2_io_drv.c
48+
device/drivers/arm_uart_drv.c
49+
device/drivers/dualtimer_cmsdk_drv.c
50+
device/drivers/rtc_pl031_drv.c
51+
device/drivers/smsc9220_eth_drv.c
52+
device/drivers/spi_pl022_drv.c
53+
54+
device/drivers/TZ-TRNG/host/src/tztrng_lib/llf_rnd.c
55+
device/drivers/TZ-TRNG/host/src/tztrng_lib/llf_rnd_common.c
56+
device/drivers/TZ-TRNG/host/src/tztrng_lib/llf_rnd_cont.c
57+
device/drivers/TZ-TRNG/host/src/tztrng_lib/llf_rnd_trng90b.c
58+
device/drivers/TZ-TRNG/host/src/tztrng_lib/tztrng_driver.c
59+
device/drivers/TZ-TRNG/host/src/tztrng_lib/tztrng_pal.c
60+
61+
device/drivers/timer_cmsdk/timer_cmsdk_drv.c
62+
${STARTUP_FILE}
63+
)

targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/TOOLCHAIN_ARM_STD/MPS2.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! armcc -E
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m3
22

33
/*
44
* MPS2 CMSIS Library

0 commit comments

Comments
 (0)