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:
parent
650852703e
commit
2aa3815a09
6 changed files with 75 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
add_subdirectory(atmel)
|
add_subdirectory(atmel)
|
||||||
add_subdirectory(cmsis)
|
add_subdirectory(cmsis)
|
||||||
|
add_subdirectory(cypress)
|
||||||
add_subdirectory_if_kconfig(libmetal)
|
add_subdirectory_if_kconfig(libmetal)
|
||||||
add_subdirectory(nordic)
|
add_subdirectory(nordic)
|
||||||
add_subdirectory(nxp)
|
add_subdirectory(nxp)
|
||||||
|
|
|
@ -16,6 +16,8 @@ source "ext/hal/altera/Kconfig"
|
||||||
|
|
||||||
source "ext/hal/cmsis/Kconfig"
|
source "ext/hal/cmsis/Kconfig"
|
||||||
|
|
||||||
|
source "ext/hal/cypress/Kconfig"
|
||||||
|
|
||||||
source "ext/hal/libmetal/Kconfig"
|
source "ext/hal/libmetal/Kconfig"
|
||||||
|
|
||||||
source "ext/hal/nordic/Kconfig"
|
source "ext/hal/nordic/Kconfig"
|
||||||
|
|
10
ext/hal/cypress/CMakeLists.txt
Normal file
10
ext/hal/cypress/CMakeLists.txt
Normal 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
10
ext/hal/cypress/Kconfig
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Cypress Semiconductor
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
config HAS_CYPRESS_DRIVERS
|
||||||
|
bool
|
||||||
|
select HAS_CMSIS
|
||||||
|
|
45
ext/hal/cypress/PDL/3.1.0/CMakeLists.txt
Normal file
45
ext/hal/cypress/PDL/3.1.0/CMakeLists.txt
Normal 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)
|
7
ext/hal/cypress/PDL/CMakeLists.txt
Normal file
7
ext/hal/cypress/PDL/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018, Cypress
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
add_subdirectory(3.1.0)
|
Loading…
Add table
Add a link
Reference in a new issue