Skip to content

Commit fe8099c

Browse files
committed
Prevent sketch compiled with S132 v2 upload to device running S132 v5 and vice versa
1 parent 6f71f1e commit fe8099c

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

boards.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ feather52.menu.softdevice.s132v201=0.5.0 dual, S132 2.0.1
4242
feather52.menu.softdevice.s132v201.build.sd_flags=-DS132 -DSD_VER=201
4343
feather52.menu.softdevice.s132v201.build.sd_name=s132
4444
feather52.menu.softdevice.s132v201.build.sd_version=2.0.1
45+
feather52.menu.softdevice.s132v201.build.sd_fwid=0x0088
4546
feather52.menu.softdevice.s132v201.build.bootfile=0.5.0/dual/feather52_bootloader_v050_s132_v201
4647
feather52.menu.softdevice.s132v201.upload.maximum_size=165888
4748
feather52.menu.softdevice.s132v201.upload.maximum_data_size=51072
@@ -50,6 +51,7 @@ feather52.menu.softdevice.s132v510=5.1.0 dual, S132 5.1.0
5051
feather52.menu.softdevice.s132v510.build.sd_flags=-DS132 -DSD_VER=510
5152
feather52.menu.softdevice.s132v510.build.sd_name=s132
5253
feather52.menu.softdevice.s132v510.build.sd_version=5.1.0
54+
feather52.menu.softdevice.s132v510.build.sd_fwid=0x00A5
5355
feather52.menu.softdevice.s132v510.build.bootfile={build.sd_version}/dual/feather52_bootloader_5.1.0_s132_dual
5456
feather52.menu.softdevice.s132v510.upload.maximum_size=151552
5557
feather52.menu.softdevice.s132v510.upload.maximum_data_size=51072

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Adafruit nRF52 Arduino Core Changelog
22

3+
## 0.8.1
4+
5+
- Prevent sketch compiled with S132 v2 upload to device running S132 v5 and vice versa.
6+
37
## 0.8.0
48

59
## Core

cores/nRF5/utility/utilities.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
static lookup_entry_t const sd_lookup_items[] =
4646
{
4747
{ .key = 0x0088, .data = "S132 2.0.1" },
48-
{ .key = 0x009D, .data = "S132 5.0.0" },
4948
{ .key = 0x00A5, .data = "S132 5.1.0" },
5049
};
5150

libraries/Bluefruit52Lib/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit BLE Libraries for Bluefruit52
2-
version=0.8.0
2+
version=0.8.1
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library for nRF52-based Adafruit Bluefruit LE modules

platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818

1919
name=Adafruit nRF52 Boards
20-
version=0.8.0
20+
version=0.8.1
2121

2222
# Compile variables
2323
# -----------------
@@ -102,7 +102,7 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}"
102102
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
103103

104104
## Creat dfu package zip file
105-
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
105+
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --dev-type 0x0052 --sd-req {build.sd_fwid} --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
106106

107107
## Save bin
108108
recipe.output.tmp_file_bin={build.project_name}.bin

tools/nrfutil-0.5.2/nordicsemi/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ def serial(package, port, baudrate, flowcontrol):
287287
click.echo("Failed to upgrade target. Error is: {0}".format(e.message))
288288
click.echo("")
289289
click.echo("Possible causes:")
290-
click.echo("- Bootloader, SoftDevice or Application on target "
291-
"does not match the requirements in the DFU package.")
290+
click.echo("- Selected bootloader version does not match the one on Bluefruit device.")
291+
click.echo(" Upgrade the bootloader or select correct version in Tools->Bootloader.")
292292
click.echo("- Baud rate must be 115200, Flow control must be off.")
293293
click.echo("- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.")
294294

0 commit comments

Comments
 (0)