mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13959 from hugueskamba/hk_cmake_silabs_support
CMake: Add support for all Silicon Labs Mbed targetspull/13977/head
commit
e4b03a1577
|
@ -15,6 +15,8 @@ elseif("NORDIC" IN_LIST MBED_TARGET_LABELS)
|
||||||
add_subdirectory(TARGET_NORDIC)
|
add_subdirectory(TARGET_NORDIC)
|
||||||
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
|
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
|
||||||
add_subdirectory(TARGET_NUVOTON)
|
add_subdirectory(TARGET_NUVOTON)
|
||||||
|
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_Silicon_Labs)
|
||||||
elseif("STM" IN_LIST MBED_TARGET_LABELS)
|
elseif("STM" IN_LIST MBED_TARGET_LABELS)
|
||||||
add_subdirectory(TARGET_STM)
|
add_subdirectory(TARGET_STM)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("EFM32" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_EFM32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("SL_RAIL" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_SL_RAIL)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
.
|
||||||
|
)
|
|
@ -0,0 +1,97 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("EFM32GG" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_EFM32GG)
|
||||||
|
elseif("EFM32GG11" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_EFM32GG11)
|
||||||
|
elseif("EFR32MG12" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
add_subdirectory(TARGET_EFR32MG12)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
.
|
||||||
|
common
|
||||||
|
emlib/inc
|
||||||
|
trng
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
analogin_api.c
|
||||||
|
analogout_api.c
|
||||||
|
burtc.c
|
||||||
|
can_api.c
|
||||||
|
crc_api.c
|
||||||
|
dma_api.c
|
||||||
|
flash_api.c
|
||||||
|
gpio_api.c
|
||||||
|
gpio_irq_api.c
|
||||||
|
i2c_api.c
|
||||||
|
itm_api.c
|
||||||
|
lp_ticker.c
|
||||||
|
pinmap.c
|
||||||
|
pinmap_function.c
|
||||||
|
port_api.c
|
||||||
|
pwmout_api.c
|
||||||
|
qspi_api.c
|
||||||
|
resetreason_api.c
|
||||||
|
rtcc.c
|
||||||
|
serial_api.c
|
||||||
|
sleep.c
|
||||||
|
spi_api.c
|
||||||
|
us_ticker.c
|
||||||
|
watchdog_api.c
|
||||||
|
|
||||||
|
common/mbed_overrides.c
|
||||||
|
|
||||||
|
emlib/src/em_acmp.c
|
||||||
|
emlib/src/em_adc.c
|
||||||
|
emlib/src/em_aes.c
|
||||||
|
emlib/src/em_assert.c
|
||||||
|
emlib/src/em_burtc.c
|
||||||
|
emlib/src/em_can.c
|
||||||
|
emlib/src/em_cmu.c
|
||||||
|
emlib/src/em_core.c
|
||||||
|
emlib/src/em_cryotimer.c
|
||||||
|
emlib/src/em_crypto.c
|
||||||
|
emlib/src/em_csen.c
|
||||||
|
emlib/src/em_dac.c
|
||||||
|
emlib/src/em_dbg.c
|
||||||
|
emlib/src/em_dma.c
|
||||||
|
emlib/src/em_ebi.c
|
||||||
|
emlib/src/em_emu.c
|
||||||
|
emlib/src/em_eusart.c
|
||||||
|
emlib/src/em_gpcrc.c
|
||||||
|
emlib/src/em_gpio.c
|
||||||
|
emlib/src/em_i2c.c
|
||||||
|
emlib/src/em_iadc.c
|
||||||
|
emlib/src/em_idac.c
|
||||||
|
emlib/src/em_int.c
|
||||||
|
emlib/src/em_lcd.c
|
||||||
|
emlib/src/em_ldma.c
|
||||||
|
emlib/src/em_lesense.c
|
||||||
|
emlib/src/em_letimer.c
|
||||||
|
emlib/src/em_leuart.c
|
||||||
|
emlib/src/em_mpu.c
|
||||||
|
emlib/src/em_msc.c
|
||||||
|
emlib/src/em_opamp.c
|
||||||
|
emlib/src/em_pcnt.c
|
||||||
|
emlib/src/em_pdm.c
|
||||||
|
emlib/src/em_prs.c
|
||||||
|
emlib/src/em_qspi.c
|
||||||
|
emlib/src/em_rmu.c
|
||||||
|
emlib/src/em_rtc.c
|
||||||
|
emlib/src/em_rtcc.c
|
||||||
|
emlib/src/em_se.c
|
||||||
|
emlib/src/em_system.c
|
||||||
|
emlib/src/em_timer.c
|
||||||
|
emlib/src/em_usart.c
|
||||||
|
emlib/src/em_vcmp.c
|
||||||
|
emlib/src/em_vdac.c
|
||||||
|
emlib/src/em_wdog.c
|
||||||
|
|
||||||
|
trng/sl_trng.c
|
||||||
|
trng/trng_api.c
|
||||||
|
)
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("EFM32GG_STK3700" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
TARGET_EFM32GG_STK3700
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("1024K" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||||
|
set(LINKER_FILE device/TARGET_1024K/TOOLCHAIN_ARM_STD/efm32gg.sct)
|
||||||
|
set(STARTUP_FILE device/TARGET_1024K/TOOLCHAIN_ARM_STD/startup_efm32gg.S)
|
||||||
|
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
|
set(LINKER_FILE device/TARGET_1024K/TOOLCHAIN_GCC_ARM/efm32gg.ld)
|
||||||
|
set(STARTUP_FILE device/TARGET_1024K/TOOLCHAIN_GCC_ARM/startup_efm32gg.S)
|
||||||
|
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
|
||||||
|
PeripheralPins.c
|
||||||
|
|
||||||
|
device/system_efm32gg.c
|
||||||
|
${STARTUP_FILE}
|
||||||
|
)
|
|
@ -1,4 +1,4 @@
|
||||||
#! armcc -E
|
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m3
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
; *** Scatter-Loading Description File generated by uVision ***
|
; *** Scatter-Loading Description File generated by uVision ***
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("EFM32GG11_STK3701" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
TARGET_EFM32GG11_STK3701
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||||
|
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efm32gg11.sct)
|
||||||
|
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_efm32gg11.S)
|
||||||
|
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
|
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/efm32gg11.ld)
|
||||||
|
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_efm32gg11.S)
|
||||||
|
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
|
||||||
|
PeripheralPins.c
|
||||||
|
|
||||||
|
device/system_efm32gg11b.c
|
||||||
|
${STARTUP_FILE}
|
||||||
|
)
|
|
@ -1,4 +1,4 @@
|
||||||
#! armcc -E
|
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
; *** Scatter-Loading Description File generated by uVision ***
|
; *** Scatter-Loading Description File generated by uVision ***
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("TB_SENSE_12" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
TARGET_TB_SENSE_12
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||||
|
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efr32mg12p.sct)
|
||||||
|
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_efr32mg12p.S)
|
||||||
|
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
|
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/efr32mg12p.ld)
|
||||||
|
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_efr32mg12p.S)
|
||||||
|
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
|
||||||
|
PeripheralPins.c
|
||||||
|
|
||||||
|
device/system_efr32mg12p.c
|
||||||
|
${STARTUP_FILE}
|
||||||
|
)
|
|
@ -1,4 +1,4 @@
|
||||||
#! armcc -E
|
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
; *** Scatter-Loading Description File generated by uVision ***
|
; *** Scatter-Loading Description File generated by uVision ***
|
||||||
; *************************************************************
|
; *************************************************************
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if("EFR32_12" IN_LIST MBED_TARGET_LABELS)
|
||||||
|
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||||
|
set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.ar)
|
||||||
|
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||||
|
set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.a)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(mbed-core INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_RAIL})
|
||||||
|
|
||||||
|
|
||||||
|
target_include_directories(mbed-core
|
||||||
|
INTERFACE
|
||||||
|
efr32-rf-driver/rail
|
||||||
|
efr32-rf-driver/rail/ble
|
||||||
|
efr32-rf-driver/rail/ieee802154
|
||||||
|
)
|
|
@ -25,6 +25,7 @@ The following targets are supported:
|
||||||
- Freescale targets
|
- Freescale targets
|
||||||
- GigaDevice targets
|
- GigaDevice targets
|
||||||
- MAXIM targets
|
- MAXIM targets
|
||||||
|
- Silicon Labs targets
|
||||||
- STM targets
|
- STM targets
|
||||||
|
|
||||||
### Supported toolchains
|
### Supported toolchains
|
||||||
|
|
Loading…
Reference in New Issue