Skip to content

Commit b26b425

Browse files
acalatravabrghena
authored andcommitted
modify full_adv example to make it compatible with both nRF51 and nRF52 platforms
1 parent 22a4297 commit b26b425

File tree

5 files changed

+631
-9
lines changed

5 files changed

+631
-9
lines changed

apps/full_adv/Makefile

+19-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,30 @@ APPLICATION_SRCS += app_util_platform.c
1111
APPLICATION_SRCS += nrf_drv_common.c
1212
APPLICATION_SRCS += nrf_delay.c
1313
APPLICATION_SRCS += led.c
14+
APPLICATION_SRCS += app_error.c
15+
APPLICATION_SRCS += app_error_weak.c
1416

1517
APPLICATION_SRCS += simple_ble.c
1618
APPLICATION_SRCS += simple_adv.c
1719

18-
SOFTDEVICE_MODEL = s110
20+
USE_NRF52 := $(filter nrf52,$(MAKECMDGOALS))
1921

20-
LIBRARY_PATHS += ../../include
22+
# Compile for nrf51 by default
23+
SOFTDEVICE_MODEL = s130
24+
SDK_VERSION = 11
25+
NRF_MODEL = nrf51
26+
27+
ifeq ($(USE_NRF52), nrf52)
28+
SOFTDEVICE_MODEL = s132
29+
SDK_VERSION = 11
30+
NRF_MODEL = nrf52
31+
endif
32+
33+
# Use "make nrf52" to compile for nrf52 platform
34+
nrf52: clean all
35+
36+
LIBRARY_PATHS += .
37+
#./../include
2138
SOURCE_PATHS += ../../src
2239

2340
NRF_BASE_PATH ?= ../..

apps/full_adv/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ Full Advertisement
33

44
Sends an advertisement with a full payload (taken by a long name)
55

6+
This example will compile for both nRF51 and nRF52 platforms
7+
8+
You can select the nRF52 platform by issuing `make nrf52`
9+

0 commit comments

Comments
 (0)