mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14253 from harmut01/refactor_renesas
CMake: refactor Renesas targetspull/14242/head
commit
0f000a0502
|
@ -1,13 +1,12 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if ("RZ_A1XX" IN_LIST MBED_TARGET_LABELS)
|
add_subdirectory(TARGET_RZ_A1XX EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(TARGET_RZ_A1XX)
|
add_subdirectory(TARGET_RZ_A2XX EXCLUDE_FROM_ALL)
|
||||||
elseif("RZ_A2XX" IN_LIST MBED_TARGET_LABELS)
|
|
||||||
add_subdirectory(TARGET_RZ_A2XX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(mbed-core
|
add_library(mbed-renesas INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(mbed-renesas
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if ("GR_LYCHEE" IN_LIST MBED_TARGET_LABELS)
|
add_subdirectory(TARGET_GR_LYCHEE EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(TARGET_GR_LYCHEE)
|
add_subdirectory(TARGET_RZ_A1H EXCLUDE_FROM_ALL)
|
||||||
elseif("RZ_A1H" IN_LIST MBED_TARGET_LABELS)
|
|
||||||
add_subdirectory(TARGET_RZ_A1H)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(mbed-core
|
add_library(mbed-rz-a1xx INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(mbed-rz-a1xx
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
common
|
common
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(mbed-core
|
target_sources(mbed-rz-a1xx
|
||||||
INTERFACE
|
INTERFACE
|
||||||
analogin_api.c
|
analogin_api.c
|
||||||
can_api.c
|
can_api.c
|
||||||
|
@ -35,3 +34,5 @@ target_sources(mbed-core
|
||||||
|
|
||||||
common/rza_io_regrw.c
|
common/rza_io_regrw.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(mbed-rz-a1xx INTERFACE mbed-renesas)
|
||||||
|
|
|
@ -11,10 +11,10 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
add_library(mbed-gr-lychee INTERFACE)
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(mbed-core
|
target_include_directories(mbed-gr-lychee
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
device
|
device
|
||||||
|
@ -23,7 +23,7 @@ target_include_directories(mbed-core
|
||||||
device/inc/iodefines
|
device/inc/iodefines
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(mbed-core
|
target_sources(mbed-gr-lychee
|
||||||
INTERFACE
|
INTERFACE
|
||||||
trng_api_esp32.cpp
|
trng_api_esp32.cpp
|
||||||
PeripheralPins.c
|
PeripheralPins.c
|
||||||
|
@ -40,3 +40,6 @@ target_sources(mbed-core
|
||||||
${WEAK_HANDLER_FILE}
|
${WEAK_HANDLER_FILE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mbed_set_linker_script(mbed-gr-lychee ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
||||||
|
|
||||||
|
target_link_libraries(mbed-gr-lychee INTERFACE mbed-rz-a1xx)
|
||||||
|
|
|
@ -11,10 +11,9 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
add_library(mbed-rz-a1h INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(mbed-rz-a1h
|
||||||
target_include_directories(mbed-core
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
device
|
device
|
||||||
|
@ -23,7 +22,7 @@ target_include_directories(mbed-core
|
||||||
device/inc/iodefines
|
device/inc/iodefines
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(mbed-core
|
target_sources(mbed-rz-a1h
|
||||||
INTERFACE
|
INTERFACE
|
||||||
PeripheralPins.c
|
PeripheralPins.c
|
||||||
|
|
||||||
|
@ -38,3 +37,7 @@ target_sources(mbed-core
|
||||||
${STARTUP_FILE}
|
${STARTUP_FILE}
|
||||||
${WEAK_HANDLER_FILE}
|
${WEAK_HANDLER_FILE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mbed_set_linker_script(mbed-rz-a1h ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
||||||
|
|
||||||
|
target_link_libraries(mbed-rz-a1h INTERFACE mbed-rz-a1xx)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if ("GR_MANGO" IN_LIST MBED_TARGET_LABELS)
|
add_subdirectory(TARGET_GR_MANGO EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(TARGET_GR_MANGO)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(mbed-core
|
add_library(mbed-rz-a2xx INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(mbed-rz-a2xx
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
common
|
common
|
||||||
|
@ -14,7 +14,7 @@ target_include_directories(mbed-core
|
||||||
r_can/inc
|
r_can/inc
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(mbed-core
|
target_sources(mbed-rz-a2xx
|
||||||
INTERFACE
|
INTERFACE
|
||||||
analogin_api.c
|
analogin_api.c
|
||||||
can_api.c
|
can_api.c
|
||||||
|
@ -38,3 +38,5 @@ target_sources(mbed-core
|
||||||
|
|
||||||
r_can/src/r_can_rz.c
|
r_can/src/r_can_rz.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(mbed-rz-a2xx INTERFACE mbed-renesas)
|
||||||
|
|
|
@ -11,10 +11,9 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
set(WEAK_HANDLER_FILE device/TOOLCHAIN_GCC_ARM/weak_handler.S)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
add_library(mbed-gr-mango INTERFACE)
|
||||||
|
|
||||||
|
target_include_directories(mbed-gr-mango
|
||||||
target_include_directories(mbed-core
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
device
|
device
|
||||||
|
@ -24,7 +23,7 @@ target_include_directories(mbed-core
|
||||||
device/inc/iodefine/iodefines
|
device/inc/iodefine/iodefines
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(mbed-core
|
target_sources(mbed-gr-mango
|
||||||
INTERFACE
|
INTERFACE
|
||||||
PeripheralPins.c
|
PeripheralPins.c
|
||||||
|
|
||||||
|
@ -40,3 +39,7 @@ target_sources(mbed-core
|
||||||
${STARTUP_FILE}
|
${STARTUP_FILE}
|
||||||
${WEAK_HANDLER_FILE}
|
${WEAK_HANDLER_FILE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mbed_set_linker_script(mbed-gr-mango ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
||||||
|
|
||||||
|
target_link_libraries(mbed-gr-mango INTERFACE mbed-rz-a2xx)
|
||||||
|
|
Loading…
Reference in New Issue