From 17f7b4ed9505917d617919ed9e7efde35f6711eb Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Fri, 27 Jan 2017 13:12:25 +0100 Subject: [PATCH] ext: Integrate Nordic SDK HAL files into Zephyr Nordic Semiconductor's Software Development Kit's HAL layer provides a set of low-level header and sourcefiles that give access to the different hardware peripherals of Nordic ICs. This patch includes the new files in the build and refactors the Kconfig and Kbuild files in ext/hal/nordic to acommodate for the presence of the new HAL layer. Change-Id: Ie8e1a4c9fcc7e9058a9d16a2692ef1789603aa53 Signed-off-by: Wojciech Bober Signed-off-by: Carles Cufi --- arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series | 1 + arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series | 1 + ext/hal/Kbuild | 1 + ext/hal/Kconfig | 2 +- ext/hal/Makefile | 2 +- ext/hal/nordic/Kbuild | 1 + ext/hal/nordic/{mdk => }/Kconfig | 3 +++ ext/hal/nordic/{mdk => }/Makefile | 5 ++++- 8 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 ext/hal/nordic/Kbuild rename ext/hal/nordic/{mdk => }/Kconfig (80%) rename ext/hal/nordic/{mdk => }/Makefile (50%) diff --git a/arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series b/arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series index f4b2d2dc537..9e3db4d9e76 100644 --- a/arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series +++ b/arch/arm/soc/nordic_nrf5/nrf51/Kconfig.series @@ -17,5 +17,6 @@ config SOC_SERIES_NRF51X select XIP select HAS_CMSIS select HAS_NORDIC_MDK + select HAS_NORDIC_HAL help Enable support for NRF51 MCU series diff --git a/arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series b/arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series index 02fc3a0f99c..d2e462ecbf0 100644 --- a/arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series +++ b/arch/arm/soc/nordic_nrf5/nrf52/Kconfig.series @@ -18,5 +18,6 @@ config SOC_SERIES_NRF52X select XIP select HAS_CMSIS select HAS_NORDIC_MDK + select HAS_NORDIC_HAL help Enable support for NRF52 MCU series diff --git a/ext/hal/Kbuild b/ext/hal/Kbuild index 9e5bf71308f..520e32564c8 100644 --- a/ext/hal/Kbuild +++ b/ext/hal/Kbuild @@ -2,3 +2,4 @@ obj-$(CONFIG_HAS_MCUX) += nxp/mcux/ obj-$(CONFIG_QMSI_BUILTIN) += qmsi/ obj-$(CONFIG_HAS_STM32CUBE) += st/stm32cube/ obj-$(CONFIG_HAS_CC3200SDK) += ti/cc3200sdk/ +obj-$(CONFIG_HAS_NORDIC_HAL) += nordic/ diff --git a/ext/hal/Kconfig b/ext/hal/Kconfig index 9d57eb69a6e..d6fcbe2616e 100644 --- a/ext/hal/Kconfig +++ b/ext/hal/Kconfig @@ -12,7 +12,7 @@ menu "HALs" source "ext/hal/cmsis/Kconfig" -source "ext/hal/nordic/mdk/Kconfig" +source "ext/hal/nordic/Kconfig" source "ext/hal/nxp/mcux/Kconfig" diff --git a/ext/hal/Makefile b/ext/hal/Makefile index a76944c9b8d..c8e7e22f568 100644 --- a/ext/hal/Makefile +++ b/ext/hal/Makefile @@ -2,7 +2,7 @@ include $(srctree)/ext/hal/cmsis/Makefile -include $(srctree)/ext/hal/nordic/mdk/Makefile +include $(srctree)/ext/hal/nordic/Makefile include $(srctree)/ext/hal/nxp/mcux/Makefile diff --git a/ext/hal/nordic/Kbuild b/ext/hal/nordic/Kbuild new file mode 100644 index 00000000000..d204e1751ea --- /dev/null +++ b/ext/hal/nordic/Kbuild @@ -0,0 +1 @@ +obj-$(CONFIG_HAS_NORDIC_HAL) += hal/nrf_adc.o hal/nrf_ecb.o hal/nrf_nvmc.o hal/nrf_saadc.o diff --git a/ext/hal/nordic/mdk/Kconfig b/ext/hal/nordic/Kconfig similarity index 80% rename from ext/hal/nordic/mdk/Kconfig rename to ext/hal/nordic/Kconfig index f66c8b99f4d..aca8465f993 100644 --- a/ext/hal/nordic/mdk/Kconfig +++ b/ext/hal/nordic/Kconfig @@ -6,3 +6,6 @@ config HAS_NORDIC_MDK bool + +config HAS_NORDIC_HAL + bool \ No newline at end of file diff --git a/ext/hal/nordic/mdk/Makefile b/ext/hal/nordic/Makefile similarity index 50% rename from ext/hal/nordic/mdk/Makefile rename to ext/hal/nordic/Makefile index 89ed901b717..3d58282b3bc 100644 --- a/ext/hal/nordic/mdk/Makefile +++ b/ext/hal/nordic/Makefile @@ -1,4 +1,7 @@ - ifdef CONFIG_HAS_NORDIC_MDK ZEPHYRINCLUDE += -I$(srctree)/ext/hal/nordic/mdk endif + +ifdef CONFIG_HAS_NORDIC_HAL +ZEPHYRINCLUDE += -I$(srctree)/ext/hal/nordic/hal +endif