Skip to content

Commit 6b0fceb

Browse files
Add CMake support for all Renesas targets
Add configuration files for targets and individual MCUs. Add include paths and sources to mbed-core link library and specify linker and startup scripts.
1 parent 9adc355 commit 6b0fceb

File tree

6 files changed

+245
-0
lines changed

6 files changed

+245
-0
lines changed

targets/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
2121
add_subdirectory(TARGET_Silicon_Labs)
2222
elseif("STM" IN_LIST MBED_TARGET_LABELS)
2323
add_subdirectory(TARGET_STM)
24+
elseif("Analog_Devices" IN_LIST MBED_TARGET_LABELS)
25+
add_subdirectory(TARGET_Analog_Devices)
2426
endif()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("ADUCM4X50" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_ADUCM4X50)
6+
elseif("ADUCM302X" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_ADUCM302X)
8+
endif()
9+
10+
target_include_directories(mbed-core
11+
INTERFACE
12+
.
13+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("ADUCM3029" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_ADUCM3029)
6+
endif()
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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 TOOLCHAIN_ARM_STD/ADuCM3029.sct)
6+
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
7+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/ADuCM3029.ld)
8+
endif()
9+
10+
if ("EV_COG_AD3029LZ" IN_LIST MBED_TARGET_LABELS)
11+
target_include_directories(mbed-core
12+
INTERFACE
13+
TARGET_EV_COG_AD3029LZ
14+
TARGET_EV_COG_AD3029LZ/device
15+
)
16+
17+
target_sources(mbed-core
18+
INTERFACE
19+
TARGET_EV_COG_AD3029LZ/device/system_ADuCM3029.c
20+
TARGET_EV_COG_AD3029LZ/device/startup_ADuCM3029.c
21+
)
22+
23+
target_compile_options(mbed-core
24+
INTERFACE
25+
-mcpu=cortex-m3
26+
)
27+
endif()
28+
29+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
30+
31+
target_include_directories(mbed-core
32+
INTERFACE
33+
api
34+
bsp
35+
bsp/adc
36+
bsp/beep
37+
bsp/config
38+
bsp/crc
39+
bsp/crypto
40+
bsp/drivers/adc
41+
bsp/drivers/beep
42+
bsp/drivers/crc
43+
bsp/drivers/crypto
44+
bsp/drivers/dma
45+
bsp/drivers/flash
46+
bsp/drivers/general
47+
bsp/drivers/gpio
48+
bsp/drivers/i2c
49+
bsp/drivers/pwr
50+
bsp/drivers/rng
51+
bsp/drivers/rtc
52+
bsp/drivers/spi
53+
bsp/drivers/sport
54+
bsp/drivers/tmr
55+
bsp/drivers/uart
56+
bsp/drivers/wdt
57+
bsp/drivers/xint
58+
bsp/flash
59+
bsp/gpio
60+
bsp/i2c
61+
bsp/pwr
62+
bsp/rng
63+
bsp/rtc
64+
bsp/rtos_map
65+
bsp/spi
66+
bsp/sport
67+
bsp/sys
68+
bsp/uart
69+
bsp/xint
70+
)
71+
72+
target_sources(mbed-core
73+
INTERFACE
74+
bsp/crypto/adi_crypto.c
75+
bsp/wdt/adi_wdt.c
76+
bsp/crc/adi_crc.c
77+
bsp/i2c/adi_i2c.c
78+
bsp/i2c/adi_i2c_data.c
79+
bsp/sport/adi_sport.c
80+
bsp/tmr/adi_tmr_data.c
81+
bsp/tmr/adi_tmr.c
82+
bsp/flash/adi_flash.c
83+
bsp/flash/adi_flash_data.c
84+
bsp/spi/adi_spi_data.c
85+
bsp/spi/adi_spi.c
86+
bsp/xint/adi_xint.c
87+
bsp/adc/adi_adc.c
88+
bsp/adc/adi_adc_data.c
89+
bsp/beep/adi_beep.c
90+
bsp/rtc/adi_rtc_data.c
91+
bsp/rtc/adi_rtc.c
92+
bsp/pwr/adi_pwr.c
93+
bsp/dma/adi_dma.c
94+
bsp/gpio/adi_gpio.c
95+
bsp/uart/adi_uart.c
96+
bsp/rng/adi_rng.c
97+
api/us_ticker.c
98+
api/serial_api.c
99+
api/gpio_dev_mem.c
100+
api/gpio_api.c
101+
api/flash_api.c
102+
api/spi_api.c
103+
api/i2c_api.c
104+
api/gpio_irq_api.c
105+
api/trng_api.c
106+
api/sleep.c
107+
api/PeripheralPins.c
108+
api/analogin_api.c
109+
api/rtc_api.c
110+
api/pinmap.c
111+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if ("ADUCM4050" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_ADUCM4050)
6+
endif()
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/ADuCM4050.ld)
6+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
7+
set(LINKER_FILE TOOLCHAIN_ARM_STD/ADuCM4050.sct)
8+
endif()
9+
10+
if("EV_COG_AD4050LZ" IN_LIST MBED_TARGET_LABELS)
11+
target_include_directories(mbed-core
12+
INTERFACE
13+
TARGET_EV_COG_AD4050LZ
14+
TARGET_EV_COG_AD4050LZ/device
15+
)
16+
17+
target_sources(mbed-core
18+
INTERFACE
19+
TARGET_EV_COG_AD4050LZ/device/system_ADuCM4050.c
20+
TARGET_EV_COG_AD4050LZ/device/startup_ADuCM4050.c
21+
)
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+
api
29+
bsp
30+
bsp/adc
31+
bsp/beep
32+
bsp/config
33+
bsp/crc
34+
bsp/crypto
35+
bsp/drivers/adc
36+
bsp/drivers/beep
37+
bsp/drivers/crc
38+
bsp/drivers/crypto
39+
bsp/drivers/dma
40+
bsp/drivers/flash
41+
bsp/drivers/general
42+
bsp/drivers/gpio
43+
bsp/drivers/i2c
44+
bsp/drivers/pwr
45+
bsp/drivers/rng
46+
bsp/drivers/rtc
47+
bsp/drivers/spi
48+
bsp/drivers/sport
49+
bsp/drivers/tmr
50+
bsp/drivers/uart
51+
bsp/drivers/wdt
52+
bsp/drivers/xint
53+
bsp/flash
54+
bsp/gpio
55+
bsp/i2c
56+
bsp/pwr
57+
bsp/rng
58+
bsp/rtc
59+
bsp/rtos_map
60+
bsp/spi
61+
bsp/sport
62+
bsp/sys
63+
bsp/uart
64+
bsp/xint
65+
)
66+
67+
target_sources(mbed-core
68+
INTERFACE
69+
bsp/crypto/adi_crypto.c
70+
bsp/wdt/adi_wdt.c
71+
bsp/crc/adi_crc.c
72+
bsp/i2c/adi_i2c.c
73+
bsp/i2c/adi_i2c_data.c
74+
bsp/sport/adi_sport.c
75+
bsp/tmr/adi_tmr_data.c
76+
bsp/tmr/adi_tmr.c
77+
bsp/flash/adi_flash.c
78+
bsp/flash/adi_flash_data.c
79+
bsp/spi/adi_spi_data.c
80+
bsp/spi/adi_spi.c
81+
bsp/xint/adi_xint.c
82+
bsp/adc/adi_adc.c
83+
bsp/adc/adi_adc_data.c
84+
bsp/beep/adi_beep.c
85+
bsp/rtc/adi_rtc_data.c
86+
bsp/rtc/adi_rtc.c
87+
bsp/pwr/adi_pwr.c
88+
bsp/dma/adi_dma.c
89+
bsp/gpio/adi_gpio.c
90+
bsp/uart/adi_uart.c
91+
bsp/rng/adi_rng.c
92+
api/us_ticker.c
93+
api/serial_api.c
94+
api/gpio_dev_mem.c
95+
api/gpio_api.c
96+
api/flash_api.c
97+
api/spi_api.c
98+
api/i2c_api.c
99+
api/gpio_irq_api.c
100+
api/trng_api.c
101+
api/sleep.c
102+
api/PeripheralPins.c
103+
api/analogin_api.c
104+
api/rtc_api.c
105+
api/pinmap.c
106+
107+
)

0 commit comments

Comments
 (0)