Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nrf52dk: add BLE/6lo support utilizing Nordic's SoftDevice
- Loading branch information
Showing
22 changed files
with
1,355 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
ifneq (,$(filter saul_default,$(USEMODULE))) | ||
USEMODULE += saul_gpio | ||
endif | ||
|
||
ifneq (,$(filter gnrc_netdev_default,$(USEMODULE))) | ||
USEPKG += nordic_softdevice_ble | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2016 Freie Universität Berlin | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @addtogroup cpu_nrf52 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Memory definitions for the NRF52832XXAA | ||
* | ||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de> | ||
* | ||
* @} | ||
*/ | ||
|
||
MEMORY | ||
{ | ||
rom (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000 | ||
ram (rwx) : ORIGIN = 0x20002800, LENGTH = 0xD800 | ||
} | ||
|
||
INCLUDE cortexm_base.ld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
PKG_NAME = nordic_softdevice_ble | ||
PKG_VERSION = 3288530 | ||
PKG_FILE = nrf5_iot_sdk_$(PKG_VERSION).zip | ||
PKG_URL = https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/$(PKG_FILE) | ||
PKG_DIR=$(CURDIR) | ||
PKG_BUILDDIR=$(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME) | ||
PKG_SRCDIR=$(PKG_BUILDDIR)/src | ||
|
||
SOFTDEVICE := components/softdevice/s1xx_iot/s1xx-iot-prototype3_nrf52_softdevice.hex | ||
BLE_6LOWPAN_LIB := components/iot/ble_6lowpan/lib/ble_6lowpan.a | ||
MODULE_MAKEFILE := $(PKG_DIR)/Makefile.module | ||
|
||
.PHONY: all clean distclean | ||
|
||
all: $(BINDIR)/ble_6lowpan.a $(BINDIR)/softdevice.hex | ||
|
||
$(BINDIR)/ble_6lowpan.a: $(PKG_SRCDIR)/.extracted | ||
cp $(PKG_SRCDIR)/$(BLE_6LOWPAN_LIB) $@ | ||
|
||
$(BINDIR)/softdevice.hex: $(PKG_SRCDIR)/.extracted | ||
cp $(PKG_SRCDIR)/$(SOFTDEVICE) $@ | ||
|
||
$(PKG_SRCDIR)/.extracted: $(PKG_BUILDDIR)/$(PKG_FILE) | ||
rm -rf $(@D) | ||
mkdir -p $(@D) | ||
$(AD)cd $(@D) && $(UNZIP_HERE) $(PKG_BUILDDIR)/$(PKG_FILE) | ||
|
||
# this file doesn't compile with RIOT, but is not needed either | ||
rm $(PKG_BUILDDIR)/src/components/ble/common/ble_conn_params.c | ||
|
||
# setup RIOT module makefiles for nordic SDK components | ||
cat $(MODULE_MAKEFILE) > $(PKG_SRCDIR)/components/softdevice/common/softdevice_handler/Makefile | ||
|
||
echo "MODULE=ble_common" > $(PKG_SRCDIR)/components/ble/common/Makefile | ||
cat $(MODULE_MAKEFILE) >> $(PKG_SRCDIR)/components/ble/common/Makefile | ||
|
||
cat $(MODULE_MAKEFILE) > $(PKG_SRCDIR)/components/iot/ble_ipsp/Makefile | ||
|
||
touch $@ | ||
|
||
$(PKG_BUILDDIR)/$(PKG_FILE): | ||
@mkdir -p $(@D) | ||
$(AD)$(DOWNLOAD_TO_FILE) $@ $(PKG_URL) | ||
|
||
clean:: | ||
rm -rf $(PKG_SRCDIR)/ | ||
|
||
distclean:: | ||
rm -rf $(PKG_BUILDDIR)/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
NORDIC_SRCS := $(BINDIRBASE)/pkg/$(BOARD)/nordic_softdevice_ble/src | ||
|
||
INCLUDES += \ | ||
-I$(RIOTBASE)/pkg/nordic_softdevice_ble/src \ | ||
-I$(NORDIC_SRCS)/components/ble/common \ | ||
-I$(NORDIC_SRCS)/components/device \ | ||
-I$(NORDIC_SRCS)/components/iot/ble_6lowpan \ | ||
-I$(NORDIC_SRCS)/components/iot/ble_ipsp \ | ||
-I$(NORDIC_SRCS)/components/iot/common \ | ||
-I$(NORDIC_SRCS)/components/libraries/scheduler \ | ||
-I$(NORDIC_SRCS)/components/libraries/util \ | ||
-I$(NORDIC_SRCS)/components/softdevice/common/softdevice_handler \ | ||
-I$(NORDIC_SRCS)/components/softdevice/s1xx_iot/headers \ | ||
-I$(NORDIC_SRCS)/components/softdevice/s1xx_iot/headers/nrf52 \ | ||
-I$(NORDIC_SRCS)/components/toolchain | ||
|
||
CFLAGS += -DNRF52 \ | ||
-DBLE_STACK_SUPPORT_REQD \ | ||
-DISR_STACKSIZE=8192 \ | ||
-DSOFTDEVICE_PRESENT \ | ||
-DS132 | ||
|
||
# Nordic's ble_6lowpan.a is compiled with hard-float | ||
# so set this, otherwise linking fails | ||
CFLAGS_FPU := -mfloat-abi=hard -mfpu=fpv4-sp-d16 | ||
|
||
DIRS += \ | ||
$(RIOTBASE)/pkg/nordic_softdevice_ble/src \ | ||
$(NORDIC_SRCS)/components/softdevice/common/softdevice_handler \ | ||
$(NORDIC_SRCS)/components/ble/common \ | ||
$(NORDIC_SRCS)/components/iot/ble_ipsp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(RIOTBASE)/Makefile.base |
Oops, something went wrong.