Skip to content

Commit 65999b9

Browse files
committed
Merge branch 'release/v3.6.0'
2 parents f3ae765 + cb52347 commit 65999b9

File tree

9 files changed

+150
-16
lines changed

9 files changed

+150
-16
lines changed

boards/adafruit_feather_nrf52832.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
"cpu": "cortex-m4",
55
"extra_flags": "-DNRF52832_XXAA -DNRF52",
66
"f_cpu": "64000000L",
7+
"hwids": [
8+
[
9+
"0x239A",
10+
"0x8029"
11+
],
12+
[
13+
"0x239A",
14+
"0x0029"
15+
],
16+
[
17+
"0x239A",
18+
"0x002A"
19+
],
20+
[
21+
"0x239A",
22+
"0x802A"
23+
]
24+
],
25+
"usb_product": "Feather nRF52832 Express",
726
"ldscript": "nrf52832_s132_v6.ld",
827
"mcu": "nrf52832",
928
"variant": "feather_nrf52832",

boards/adafruit_feather_nrf52840.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
"cpu": "cortex-m4",
55
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
66
"f_cpu": "64000000L",
7+
"hwids": [
8+
[
9+
"0x239A",
10+
"0x8029"
11+
],
12+
[
13+
"0x239A",
14+
"0x0029"
15+
],
16+
[
17+
"0x239A",
18+
"0x002A"
19+
],
20+
[
21+
"0x239A",
22+
"0x802A"
23+
]
24+
],
25+
"usb_product": "Feather nRF52840 Express",
726
"ldscript": "nrf52840_s140_v6.ld",
827
"mcu": "nrf52840",
928
"variant": "feather_nrf52840_express",

boards/adafruit_metro_nrf52840.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"build": {
3+
"core": "nRF5",
4+
"cpu": "cortex-m4",
5+
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DARDUINO_NRF52840_METRO -DNRF52840_XXAA",
6+
"f_cpu": "64000000L",
7+
"hwids": [
8+
[
9+
"0x239A",
10+
"0x803F"
11+
],
12+
[
13+
"0x239A",
14+
"0x003F"
15+
],
16+
[
17+
"0x239A",
18+
"0x0040"
19+
],
20+
[
21+
"0x239A",
22+
"0x8040"
23+
]
24+
],
25+
"usb_product": "Metro nRF52840 Express",
26+
"ldscript": "nrf52840_s140_v6.ld",
27+
"mcu": "nrf52840",
28+
"variant": "metro_nrf52840_express",
29+
"bsp": {
30+
"name": "adafruit"
31+
},
32+
"softdevice": {
33+
"sd_flags": "-DS140",
34+
"sd_name": "s140",
35+
"sd_version": "6.1.1",
36+
"sd_fwid": "0x00B6"
37+
},
38+
"bootloader": {
39+
"settings_addr": "0xFF000"
40+
}
41+
},
42+
"connectivity": [
43+
"bluetooth"
44+
],
45+
"debug": {
46+
"jlink_device": "nRF52840_xxAA",
47+
"onboard_tools": [
48+
"jlink"
49+
],
50+
"svd_path": "nrf52.svd"
51+
},
52+
"frameworks": [
53+
"arduino"
54+
],
55+
"name": "Metro nRF52840 Express",
56+
"upload": {
57+
"maximum_ram_size": 248832,
58+
"maximum_size": 815104,
59+
"require_upload_port": true,
60+
"speed": 115200,
61+
"protocol": "nrfutil",
62+
"protocols": [
63+
"jlink",
64+
"nrfjprog",
65+
"nrfutil"
66+
]
67+
},
68+
"url": "https://www.adafruit.com/product/4062",
69+
"vendor": "Adafruit"
70+
}

boards/nrf52840_dk_adafruit.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"cpu": "cortex-m4",
55
"extra_flags": "-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA",
66
"f_cpu": "64000000L",
7+
"hwids": [
8+
[
9+
"0x239A",
10+
"0x8029"
11+
]
12+
],
13+
"usb_product": "NRF52 DK",
714
"ldscript": "nrf52840_s140_v6.ld",
815
"mcu": "nrf52840",
916
"variant": "pca10056",

builder/frameworks/arduino

builder/main.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from os import makedirs
1818
from os.path import isdir, join
1919

20-
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
21-
DefaultEnvironment)
20+
from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild,
21+
Builder, Default, DefaultEnvironment)
2222

2323
env = DefaultEnvironment()
2424
platform = env.PioPlatform()
@@ -114,7 +114,7 @@
114114
BUILDERS=dict(
115115
PackageDfu=Builder(
116116
action=env.VerboseAction(" ".join([
117-
nrfutil_path,
117+
'"%s"' % nrfutil_path,
118118
"dfu",
119119
"genpkg",
120120
"--dev-type",
@@ -152,6 +152,7 @@
152152
upload_protocol = env.subst("$UPLOAD_PROTOCOL")
153153
target_elf = None
154154
if "nobuild" in COMMAND_LINE_TARGETS:
155+
target_elf = join("$BUILD_DIR", "${PROGNAME}.elf")
155156
target_firm = join("$BUILD_DIR", "${PROGNAME}.hex")
156157
else:
157158
target_elf = env.BuildProgram()
@@ -262,7 +263,7 @@
262263
"$UPLOAD_SPEED",
263264
"--singlebank",
264265
],
265-
UPLOADCMD="$UPLOADER $UPLOADERFLAGS -pkg $SOURCE"
266+
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS -pkg $SOURCE'
266267
)
267268
upload_actions = [env.VerboseAction(env.AutodetectUploadPort, "Looking for upload port..."),
268269
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
@@ -304,14 +305,23 @@ def _jlink_cmd_script(env, source):
304305
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
305306

306307
elif upload_protocol in debug_tools:
308+
openocd_args = [
309+
"-d%d" % (2 if int(ARGUMENTS.get("PIOVERBOSE", 0)) else 1)
310+
]
311+
openocd_args.extend(
312+
debug_tools.get(upload_protocol).get("server").get("arguments", []))
313+
openocd_args.extend([
314+
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
315+
board.get("upload.offset_address", "")
316+
])
317+
openocd_args = [
318+
f.replace("$PACKAGE_DIR",
319+
platform.get_package_dir("tool-openocd") or "")
320+
for f in openocd_args
321+
]
307322
env.Replace(
308323
UPLOADER="openocd",
309-
UPLOADERFLAGS=["-s", platform.get_package_dir("tool-openocd") or ""] +
310-
debug_tools.get(upload_protocol).get("server").get("arguments", []) + [
311-
"-c",
312-
"program {$SOURCE} verify reset %s; shutdown;" %
313-
env.BoardConfig().get("upload.offset_address", "")
314-
],
324+
UPLOADERFLAGS=openocd_args,
315325
UPLOADCMD="$UPLOADER $UPLOADERFLAGS")
316326
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
317327

examples/arduino-bluefruit-bleuart/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ platform = nordicnrf52
2525
framework = arduino
2626
board = nrf52840_dk_adafruit
2727
monitor_speed = 115200
28+
29+
[env:adafruit_metro_nrf52840]
30+
platform = nordicnrf52
31+
framework = arduino
32+
board = adafruit_metro_nrf52840
33+
monitor_speed = 115200

platform.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git",
1313
"url": "https://github.com/platformio/platform-nordicnrf52.git"
1414
},
15-
"version": "3.5.0",
15+
"version": "3.6.0",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"http://dl.platformio.org/packages/manifest.json"
@@ -35,12 +35,12 @@
3535
"framework-mbed": {
3636
"type": "framework",
3737
"optional": true,
38-
"version": "~5.51203.190509"
38+
"version": "~5.51304.190826"
3939
},
4040
"framework-arduinoadafruitnrf52": {
4141
"type": "framework",
4242
"optional": true,
43-
"version": "~1.1001.0"
43+
"version": "~1.1101.0"
4444
},
4545
"framework-arduinonordicnrf5": {
4646
"type": "framework",

platform.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,16 @@ def _add_default_debug_tools(self, board):
109109
}
110110

111111
else:
112-
server_args = ["-f", "scripts/interface/%s.cfg" % link]
112+
server_args = [
113+
"-s", "$PACKAGE_DIR/scripts",
114+
"-f", "interface/%s.cfg" % link
115+
]
113116
if link == "stlink":
114117
server_args.extend([
115118
"-c",
116119
"transport select hla_swd; set WORKAREASIZE 0x4000"
117120
])
118-
server_args.extend(["-f", "scripts/target/nrf52.cfg"])
121+
server_args.extend(["-f", "target/nrf52.cfg"])
119122
debug['tools'][link] = {
120123
"server": {
121124
"package": "tool-openocd",

0 commit comments

Comments
 (0)