CMake: Add support for LPC11XX_11CXX targets

All LPC11XX_11CXX targets supported by Mbed OS
can now be built with CMake.
pull/13924/head
Hugues Kamba 2020-11-18 13:26:28 +00:00 committed by Martin Kojtal
parent 229b9ad43b
commit 4acc57c2f4
3 changed files with 70 additions and 0 deletions

View File

@ -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("NXP" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NXP)
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_Silicon_Labs)
elseif("STM" IN_LIST MBED_TARGET_LABELS)

View File

@ -0,0 +1,20 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if("LPC11XX_11CXX" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_LPC11XX_11CXX)
elseif("LPC176X" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_LPC176X)
elseif("MCUXpresso_MCUS" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_MCUXpresso_MCUS)
endif()
target_include_directories(mbed-core
INTERFACE
.
)
target_sources(mbed-core
INTERFACE
USBHAL_LPC17.cpp
)

View File

@ -0,0 +1,48 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if("LPC11XX" IN_LIST MBED_TARGET_LABELS)
target_include_directories(mbed-core
INTERFACE
TARGET_LPC11XX
)
target_sources(mbed-core
INTERFACE
TARGET_LPC11XX/device/system_LPC11xx.c
)
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/TARGET_LPC11XX/startup_LPC11xx.S)
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/TARGET_LPC11XX/LPC1114.sct)
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_LPC11xx.S)
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/TARGET_LPC11XX/LPC1114.ld)
endif()
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
analogin_api.c
gpio_api.c
gpio_irq_api.c
i2c_api.c
pinmap.c
port_api.c
pwmout_api.c
serial_api.c
sleep.c
spi_api.c
us_ticker.c
device/cmsis_nvic.c
${STARTUP_FILE}
)