Skip to content

Commit 348b4e9

Browse files
committed
CMake: Add support for Maxim MAX32620C targets
Add CMakeLists.txt file to for the target family source files.
1 parent e77b1d8 commit 348b4e9

File tree

4 files changed

+103
-3
lines changed

4 files changed

+103
-3
lines changed

targets/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ if("ARM_FM" IN_LIST MBED_TARGET_LABELS)
55
add_subdirectory(TARGET_ARM_FM)
66
elseif("Freescale" IN_LIST MBED_TARGET_LABELS)
77
add_subdirectory(TARGET_Freescale)
8+
elseif("Maxim" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_Maxim)
810
elseif("NORDIC" IN_LIST MBED_TARGET_LABELS)
911
add_subdirectory(TARGET_NORDIC)
12+
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
13+
add_subdirectory(TARGET_NUVOTON)
1014
elseif("STM" IN_LIST MBED_TARGET_LABELS)
1115
add_subdirectory(TARGET_STM)
12-
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
13-
add_subdirectory(TARGET_NUVOTON)
1416
endif()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("MAX32620C" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_MAX32620C)
6+
elseif("MAX32625" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_MAX32625)
8+
elseif("MAX32630" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_MAX32630)
10+
endif()
11+
12+
target_include_directories(mbed-core
13+
INTERFACE
14+
.
15+
)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("MAX32620FTHR" IN_LIST MBED_TARGET_LABELS)
5+
target_include_directories(mbed-core
6+
INTERFACE
7+
TARGET_MAX32620FTHR
8+
)
9+
elseif("SDT32620B" IN_LIST MBED_TARGET_LABELS)
10+
target_include_directories(mbed-core
11+
INTERFACE
12+
TARGET_SDT32620B
13+
)
14+
endif()
15+
16+
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
17+
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/MAX32620.sct)
18+
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_max32620.S)
19+
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
20+
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/max32620.ld)
21+
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_max32620.S)
22+
endif()
23+
24+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
25+
26+
target_include_directories(mbed-core
27+
INTERFACE
28+
.
29+
device
30+
mxc
31+
)
32+
33+
target_sources(mbed-core
34+
INTERFACE
35+
PeripheralPins.c
36+
analogin_api.c
37+
flash_api.c
38+
gpio_api.c
39+
gpio_irq_api.c
40+
i2c_api.c
41+
pinmap.c
42+
port_api.c
43+
pwmout_api.c
44+
rtc_api.c
45+
serial_api.c
46+
sleep.c
47+
spi_api.c
48+
us_ticker.c
49+
50+
device/device_nvic.c
51+
device/system_max32620.c
52+
53+
mxc/adc.c
54+
mxc/clkman.c
55+
mxc/crc.c
56+
mxc/flc.c
57+
mxc/gpio.c
58+
mxc/i2cm.c
59+
mxc/i2cs.c
60+
mxc/icc.c
61+
mxc/ioman.c
62+
mxc/lp.c
63+
mxc/maa.c
64+
mxc/mxc_aes.c
65+
mxc/mxc_assert.c
66+
mxc/mxc_lock.c
67+
mxc/mxc_sys.c
68+
mxc/owm.c
69+
mxc/pmu.c
70+
mxc/prng.c
71+
mxc/pt.c
72+
mxc/rtc.c
73+
mxc/spim.c
74+
mxc/spis.c
75+
mxc/spix.c
76+
mxc/tmr.c
77+
mxc/tmr_utils.c
78+
mxc/uart.c
79+
mxc/wdt.c
80+
mxc/wdt2.c
81+
82+
${STARTUP_FILE}
83+
)

targets/TARGET_Maxim/TARGET_MAX32620C/device/TOOLCHAIN_ARM_STD/MAX32620.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-m4
22
; MAX32620
33
; 2MB FLASH (0x200000) @ 0x000000000
44
; 256KB RAM (0x40000) @ 0x20000000

0 commit comments

Comments
 (0)