Skip to content

Commit cf97118

Browse files
d00616sandeepmistry
authored andcommitted
Support for some NRF boards (sandeepmistry#47)
* Support for an minimalistic nRF52832 board by Shenzhen Taida Century Technology Co Ltd. Features: - two buttons - two LEDs - IO-Ports - Header for current messurement https://de.aliexpress.com/item/2-pcs-lot-FREE-SHIPPING-cost-effective-NRF52832-development-board/32690752353.html https://de.aliexpress.com/item/NRF52832-high-cost-development-board-gold-core-board/32718892277.html * Support for "Generic nRF52" board. * Support for NRF51822 or NRF51422 Developer Boards PCA1000X - PCA10000: USB device from NRF51 DK - PCA1000[1,2,3,4]: With nRF6310 or BLE DEVKIT.N R2 (mommosoft) board http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Development-Kit
1 parent c3f24b1 commit cf97118

File tree

9 files changed

+562
-5
lines changed

9 files changed

+562
-5
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ script:
2727
- buildExampleSketch sandeepmistry:nRF5:RedBearLab_nRF51822:version=1_0 01.Basics Blink
2828
- buildExampleSketch sandeepmistry:nRF5:BBCmicrobit 01.Basics Blink
2929
- buildExampleSketch sandeepmistry:nRF5:Generic_nRF51822:chip=xxac 01.Basics Blink
30+
- buildExampleSketch sandeepmistry:nRF5:Generic_nRF52832 01.Basics Blink
3031
- buildExampleSketch sandeepmistry:nRF5:OSHChip 01.Basics Blink
32+
- buildExampleSketch sandeepmistry:nRF5:STCT_nRF52_minidev 01.Basics Blink
33+
- buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=pca10000 01.Basics Blink
34+
- buildExampleSketch sandeepmistry:nRF5:PCA1000X:board_variant=nrf6310 01.Basics Blink

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@ Does not require a custom bootloader on the device.
88

99
## Supported boards
1010

11-
* [nRF52 DK](https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52-DK)
11+
### nRF52
12+
* [Plain nRF52 MCU](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832)
13+
* [Nordic Semiconductor nRF52 DK](https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52-DK)
1214
* For boards prior to ```2016.9``` (see sticker), the lastest JLink bootloader is required to upload sketches. To upgrade, press the boot/reset button while powering on the board and copy over the latest [bootloader](https://www.nordicsemi.com/eng/nordic/Products/nRF52-DK/nRF5x-OB-JLink-IF/52275).
15+
* [Shenzhen Taida Century Technology nRF52 low cost development board](https://www.aliexpress.com/item/NRF52832-high-cost-development-board-gold-core-board/32725601299.html)
16+
17+
### nRF51
18+
* [Plain nRF51 MCU](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822)
19+
* [BBC micro:bit](https://www.microbit.co.uk/)
1320
* [Bluz DK](http://bluz.io)
21+
* Nordic Semiconductor [nRF51822 Development Kit](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822-Development-Kit) + [nRF51422 Development Kit](https://www.nordicsemi.com/eng/Products/ANT/nRF51422-Development-Kit)
22+
* PCA10000
23+
* PCA10001, PCA10002, PCA10003, PCA10004 via nRF6310(nRFgo)
24+
* [OSHChip](http://www.oshchip.org/)
1425
* [RedBearLab BLE Nano](http://redbearlab.com/blenano/)
1526
* [RedBearLab nRF51822](http://redbearlab.com/redbearlab-nrf51822/)
16-
* [BBC micro:bit](https://www.microbit.co.uk/)
17-
* [OSHChip](http://www.oshchip.org/)
1827

1928
## Installing
2029

boards.txt

Lines changed: 129 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ menu.chip=Chip
1919
menu.softdevice=Softdevice
2020
menu.version=Version
2121
menu.lfclk=Low Frequency Clock
22+
menu.board_variant=Board Variant
2223

2324
nRF52DK.name=nRF52 DK
2425

@@ -64,6 +65,43 @@ nRF52DK.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
6465
nRF52DK.menu.lfclk.lfsynt=Synthesized
6566
nRF52DK.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
6667

68+
69+
STCT_nRF52_minidev.name=Taida Century nRF52 mini board
70+
71+
STCT_nRF52_minidev.upload.tool=sandeepmistry:openocd
72+
STCT_nRF52_minidev.upload.target=nrf52
73+
STCT_nRF52_minidev.upload.maximum_size=524288
74+
75+
STCT_nRF52_minidev.bootloader.tool=sandeepmistry:openocd
76+
77+
STCT_nRF52_minidev.build.mcu=cortex-m4
78+
STCT_nRF52_minidev.build.f_cpu=16000000
79+
STCT_nRF52_minidev.build.board=STCT_NRF52_minidev
80+
STCT_nRF52_minidev.build.core=nRF5
81+
STCT_nRF52_minidev.build.variant=Taida_Century_nRF52_minidev
82+
STCT_nRF52_minidev.build.variant_system_lib=
83+
STCT_nRF52_minidev.build.extra_flags=-DNRF52
84+
STCT_nRF52_minidev.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
85+
STCT_nRF52_minidev.build.ldscript=nrf52_xxaa.ld
86+
87+
STCT_nRF52_minidev.menu.softdevice.none=None
88+
STCT_nRF52_minidev.menu.softdevice.none.softdevice=none
89+
90+
STCT_nRF52_minidev.menu.softdevice.s132=S132
91+
STCT_nRF52_minidev.menu.softdevice.s132.softdevice=s132
92+
STCT_nRF52_minidev.menu.softdevice.s132.softdeviceversion=2.0.1
93+
STCT_nRF52_minidev.menu.softdevice.s132.upload.maximum_size=409600
94+
STCT_nRF52_minidev.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
95+
STCT_nRF52_minidev.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
96+
97+
STCT_nRF52_minidev.menu.lfclk.lfxo=Crystal Oscillator
98+
STCT_nRF52_minidev.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
99+
STCT_nRF52_minidev.menu.lfclk.lfrc=RC Oscillator
100+
STCT_nRF52_minidev.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
101+
STCT_nRF52_minidev.menu.lfclk.lfsynt=Synthesized
102+
STCT_nRF52_minidev.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
103+
104+
67105
BluzDK.name=Bluz DK
68106

69107
BluzDK.upload.tool=sandeepmistry:openocd
@@ -183,7 +221,6 @@ RedBearLab_nRF51822.menu.softdevice.s130.upload.maximum_size=151552
183221
RedBearLab_nRF51822.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
184222
RedBearLab_nRF51822.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_{build.chip}.ld
185223

186-
187224
BBCmicrobit.name=BBC micro:bit
188225

189226
BBCmicrobit.vid.0=0x0d28
@@ -225,7 +262,7 @@ BBCmicrobit.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
225262
BBCmicrobit.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
226263

227264

228-
Generic_nRF51822.name=Generic nRF51822
265+
Generic_nRF51822.name=Generic nRF51
229266

230267
Generic_nRF51822.upload.tool=sandeepmistry:openocd
231268
Generic_nRF51822.upload.target=nrf51
@@ -273,6 +310,42 @@ Generic_nRF51822.menu.lfclk.lfsynt=Synthesized
273310
Generic_nRF51822.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
274311

275312

313+
Generic_nRF52832.name=Generic nRF52
314+
315+
Generic_nRF52832.upload.tool=sandeepmistry:openocd
316+
Generic_nRF52832.upload.target=nrf52
317+
Generic_nRF52832.upload.maximum_size=524288
318+
319+
Generic_nRF52832.bootloader.tool=sandeepmistry:openocd
320+
321+
Generic_nRF52832.build.mcu=cortex-m4
322+
Generic_nRF52832.build.f_cpu=16000000
323+
Generic_nRF52832.build.board=GENERIC
324+
Generic_nRF52832.build.core=nRF5
325+
Generic_nRF52832.build.variant=Generic
326+
Generic_nRF52832.build.variant_system_lib=
327+
Generic_nRF52832.build.extra_flags=-DNRF52
328+
Generic_nRF52832.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
329+
Generic_nRF52832.build.ldscript=nrf52_xxaa.ld
330+
331+
Generic_nRF52832.menu.softdevice.none=None
332+
Generic_nRF52832.menu.softdevice.none.softdevice=none
333+
334+
Generic_nRF52832.menu.softdevice.s132=S132
335+
Generic_nRF52832.menu.softdevice.s132.softdevice=s132
336+
Generic_nRF52832.menu.softdevice.s132.softdeviceversion=2.0.1
337+
Generic_nRF52832.menu.softdevice.s132.upload.maximum_size=409600
338+
Generic_nRF52832.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
339+
Generic_nRF52832.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
340+
341+
Generic_nRF52832.menu.lfclk.lfxo=Crystal Oscillator
342+
Generic_nRF52832.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
343+
Generic_nRF52832.menu.lfclk.lfrc=RC Oscillator
344+
Generic_nRF52832.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
345+
Generic_nRF52832.menu.lfclk.lfsynt=Synthesized
346+
Generic_nRF52832.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
347+
348+
276349
Waveshare_BLE400.name=Waveshare BLE400
277350

278351
Waveshare_BLE400.upload.tool=sandeepmistry:openocd
@@ -350,3 +423,57 @@ OSHChip.menu.softdevice.s130.softdeviceversion=2.0.1
350423
OSHChip.menu.softdevice.s130.upload.maximum_size=151552
351424
OSHChip.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
352425
OSHChip.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxac.ld
426+
427+
PCA1000X.name=nRF51X22 Development Kit(PCA1000X)
428+
429+
PCA1000X.upload.tool=sandeepmistry:openocd
430+
PCA1000X.upload.target=nrf51
431+
PCA1000X.upload.maximum_size=262144
432+
433+
PCA1000X.bootloader.tool=sandeepmistry:openocd
434+
435+
PCA1000X.build.mcu=cortex-m0
436+
PCA1000X.build.f_cpu=16000000
437+
PCA1000X.build.board=PCA1000X
438+
PCA1000X.build.core=nRF5
439+
PCA1000X.build.variant=PCA1000X
440+
PCA1000X.build.variant_system_lib=
441+
PCA1000X.build.extra_flags=-DNRF51 -D{board.variant}
442+
PCA1000X.build.float_flags=
443+
PCA1000X.build.ldscript=nrf51_xxaa.ld
444+
445+
PCA1000X.upload.tool=sandeepmistry:openocd
446+
PCA1000X.upload.protocol=
447+
PCA1000X.upload.interface=jlink
448+
PCA1000X.upload.target=nrf51
449+
PCA1000X.upload.maximum_size=262144
450+
PCA1000X.upload.setup_command=transport select swd; set WORKAREASIZE 0;
451+
452+
PCA1000X.menu.board_variant.pca10000=PCA10000
453+
PCA1000X.menu.board_variant.pca10000.board.variant=PCA10000
454+
PCA1000X.menu.board_variant.nrf6310=PCA1000X (via nRF6310)
455+
PCA1000X.menu.board_variant.nrf6310.board.variant=NRF6310
456+
457+
PCA1000X.menu.softdevice.none=None
458+
PCA1000X.menu.softdevice.none.softdevice=none
459+
460+
PCA1000X.menu.softdevice.s110=S110
461+
PCA1000X.menu.softdevice.s110.softdevice=s110
462+
PCA1000X.menu.softdevice.s110.softdeviceversion=8.0.0
463+
PCA1000X.menu.softdevice.s110.upload.maximum_size=151552
464+
PCA1000X.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
465+
PCA1000X.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_xxaa.ld
466+
467+
PCA1000X.menu.softdevice.s130=S130
468+
PCA1000X.menu.softdevice.s130.softdevice=s130
469+
PCA1000X.menu.softdevice.s130.softdeviceversion=2.0.1
470+
PCA1000X.menu.softdevice.s130.upload.maximum_size=151552
471+
PCA1000X.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
472+
PCA1000X.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
473+
474+
PCA1000X.menu.lfclk.lfxo=Crystal Oscillator
475+
PCA1000X.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
476+
PCA1000X.menu.lfclk.lfrc=RC Oscillator
477+
PCA1000X.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
478+
PCA1000X.menu.lfclk.lfsynt=Synthesized
479+
PCA1000X.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT

variants/PCA1000X/pins_arduino.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
This library is free software; you can redistribute it and/or
4+
modify it under the terms of the GNU Lesser General Public
5+
License as published by the Free Software Foundation; either
6+
version 2.1 of the License, or (at your option) any later version.
7+
This library is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
See the GNU Lesser General Public License for more details.
11+
You should have received a copy of the GNU Lesser General Public
12+
License along with this library; if not, write to the Free Software
13+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14+
*/
15+
16+
// API compatibility
17+
#include "variant.h"

variants/PCA1000X/variant.cpp

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
Copyright (c) 2016 Frank Holtz. All right reserved.
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14+
See the GNU Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19+
*/
20+
21+
#include "variant.h"
22+
23+
#ifdef PCA10000
24+
const uint32_t g_ADigitalPinMap[] = {
25+
8, // RTS
26+
9, // TxD
27+
10, // CTS
28+
11, // RxD
29+
21, // LED Red
30+
22, // LED Green
31+
23, // LED Blue
32+
};
33+
#else
34+
const uint32_t g_ADigitalPinMap[] = {
35+
0,
36+
1,
37+
2,
38+
3,
39+
4,
40+
5,
41+
6,
42+
7,
43+
8,
44+
9,
45+
10,
46+
11,
47+
12,
48+
13,
49+
14,
50+
15,
51+
16,
52+
17,
53+
18,
54+
19,
55+
20,
56+
21,
57+
22,
58+
23,
59+
24,
60+
25,
61+
26,
62+
27,
63+
28,
64+
29,
65+
30,
66+
31
67+
};
68+
#endif

0 commit comments

Comments
 (0)