boards: Add support for the nRF52 DK board (PCA10040)

Add board support for the Nordic Semiconductor's
nRF52832 (nRF52 series) Development Kit.

JIRA: ZEP-377
Change-Id: I6d8f1f7ec1b8a068193f6ba67c8a1ab9f399f80b
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Håkon Alseth <haakon.alseth@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2016-05-18 07:53:48 -07:00 committed by Anas Nashif
parent 7923617c8f
commit 44351ef004
7 changed files with 145 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Kconfig - nRF52 PCA10040 board configuration
#
# Copyright (c) 2016 Nordic Semiconductor ASA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if BOARD_NRF52_PCA10040
config GPIO_AS_PINRESET
bool "GPIO as pin reset (reset button)"
default y
endif # BOARD_NRF52_PCA10040

View file

@ -0,0 +1,19 @@
# Kconfig - nRF52 PCA10040 board configuration
#
# Copyright (c) 2016 Nordic Semiconductor ASA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
config BOARD_NRF52_PCA10040
bool "nRF52 PCA10040"
depends on SOC_NRF52832

View file

@ -0,0 +1,35 @@
# Kconfig - nRF52 PCA10040 board configuration
#
# Copyright (c) 2016 Nordic Semiconductor ASA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if BOARD_NRF52_PCA10040
config BOARD
default nrf52_pca10040
if UART_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0
default y
endif # UART_NRF5
endif # BOARD_NRF52_PCA10040

View file

@ -0,0 +1,5 @@
ccflags-y += -I$(srctree)/include/drivers
ccflags-y += -I$(srctree)/drivers
asflags-y := ${ccflags-y}
obj-y += board.o

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2016 Nordic Semiconductor ASA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <nanokernel.h>
#include "board.h"
#include <uart.h>
#include <device.h>
#include <init.h>

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2016 Nordic Semiconductor ASA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __INC_BOARD_H
#define __INC_BOARD_H
#include <soc.h>
#endif /* __INC_BOARD_H */

View file

@ -0,0 +1,20 @@
CONFIG_ARM=y
CONFIG_BOARD_NRF52_PCA10040=y
CONFIG_SOC_FAMILY_NRF5=y
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=64000000
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_FLASH_SIZE=512
CONFIG_SRAM_SIZE=64
CONFIG_XIP=y
# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_NRF5=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# additional board options
CONFIG_GPIO_AS_PINRESET=y