ext: hal: cypress: Integrate Cypress PDL into Zephyr Build system

Add initial support for building Cypress PDL as part of Zephyr.

Signed-off-by: Nazar Chornenkyy <nazar.chornenkyy@cypress.com>
Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
This commit is contained in:
Nazar Chornenkyy 2018-07-09 16:28:27 -05:00 committed by Anas Nashif
commit 2aa3815a09
6 changed files with 75 additions and 0 deletions

View file

@ -1,5 +1,6 @@
add_subdirectory(atmel)
add_subdirectory(cmsis)
add_subdirectory(cypress)
add_subdirectory_if_kconfig(libmetal)
add_subdirectory(nordic)
add_subdirectory(nxp)

View file

@ -16,6 +16,8 @@ source "ext/hal/altera/Kconfig"
source "ext/hal/cmsis/Kconfig"
source "ext/hal/cypress/Kconfig"
source "ext/hal/libmetal/Kconfig"
source "ext/hal/nordic/Kconfig"

View file

@ -0,0 +1,10 @@
#
# Copyright (c) 2018, Cypress
#
# SPDX-License-Identifier: Apache-2.0
#
add_subdirectory_ifdef(
CONFIG_HAS_CYPRESS_DRIVERS
PDL
)

10
ext/hal/cypress/Kconfig Normal file
View file

@ -0,0 +1,10 @@
#
# Copyright (c) 2018 Cypress Semiconductor
#
# SPDX-License-Identifier: Apache-2.0
#
config HAS_CYPRESS_DRIVERS
bool
select HAS_CMSIS

View file

@ -0,0 +1,45 @@
#
# Copyright (c) 2018, Cypress
#
# SPDX-License-Identifier: Apache-2.0
#
zephyr_compile_definitions(${CONFIG_SOC_PART_NUMBER})
# Workaround to fix absence of four defines in PDL
# The values don't matter
zephyr_compile_definitions(
__copy_table_start__=0
)
zephyr_compile_definitions(
__copy_table_end__=0
)
zephyr_compile_definitions(
__bss_start__=0
)
zephyr_compile_definitions(
__bss_end__=0
)
zephyr_include_directories(drivers/include)
zephyr_sources(drivers/source/cy_sysclk.c)
zephyr_include_directories(devices/psoc6/include)
zephyr_include_directories(devices/psoc6/include/ip)
zephyr_sources(devices/psoc6/startup/system_psoc6_cm0plus.c)
zephyr_sources(devices/psoc6/startup/gcc/startup_psoc62_cm0plus.S)
zephyr_sources(drivers/source/cy_device.c)
zephyr_sources(drivers/source/cy_syslib.c)
zephyr_sources(drivers/source/cy_sysint.c)
zephyr_sources(drivers/source/gcc/cy_syslib_gcc.S)
zephyr_sources(drivers/source/cy_gpio.c)
zephyr_sources(drivers/source/cy_prot.c)
zephyr_sources(drivers/source/cy_syspm.c)
zephyr_sources(drivers/source/cy_sysclk.c)
zephyr_sources(drivers/source/cy_flash.c)
zephyr_sources(drivers/source/cy_ipc_drv.c)
zephyr_sources(drivers/source/cy_ipc_config.c)
zephyr_sources(drivers/source/cy_ipc_sema.c)
zephyr_sources(drivers/source/cy_ipc_pipe.c)
zephyr_sources(drivers/source/cy_scb_uart.c)
zephyr_sources(drivers/source/cy_scb_common.c)

View file

@ -0,0 +1,7 @@
#
# Copyright (c) 2018, Cypress
#
# SPDX-License-Identifier: Apache-2.0
#
add_subdirectory(3.1.0)