Add support for CYTFM_064B0S2_4343W

pull/13934/head
Hugues Kamba 2020-11-20 14:46:54 +00:00
parent fafc5c33e7
commit efafbd5dc4
1 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,64 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if("BSP_DESIGN_MODUS" IN_LIST MBED_TARGET_LABELS)
target_include_directories(mbed-core
INTERFACE
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource
)
target_sources(mbed-core
INTERFACE
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_clocks.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_peripherals.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_pins.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_routing.c
COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_system.c
)
endif()
if("CM4" IN_LIST MBED_TARGET_LABELS)
set(SYSTEM_SOURCE device/COMPONENT_CM4/system_psoc6_cm4.c)
target_include_directories(mbed-core
INTERFACE
device/COMPONENT_CM4
)
target_sources(mbed-core
INTERFACE
device/COMPONENT_CM4/device_definition.c
)
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/COMPONENT_CM4/TOOLCHAIN_ARM/cyb06xxa_cm4_dual.sct)
set(STARTUP_FILE device/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_02_cm4.S)
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/cyb06xxa_cm4_dual.ld)
set(STARTUP_FILE device/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S)
endif()
endif()
set_property(
GLOBAL PROPERTY
MBED_TARGET_LINKER_FILE
${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}
)
target_include_directories(mbed-core
INTERFACE
.
device
partition
)
target_sources(mbed-core
INTERFACE
PeripheralPins.c
cybsp.c
cytfm_flash_info.c
${SYSTEM_SOURCE}
${STARTUP_FILE}
)