Skip to content

Commit 89a0956

Browse files
committed
revert init_packet.py, change back tool for osx to script instead of binary
1 parent c7185c7 commit 89a0956

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

boards.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ feather52.build.nrfutil=nrfutil
5050
feather52.build.nrfutil.windows={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe
5151
# Legacy MacOS nrfutil location, this is for when people had it globally
5252
# installed and is left just for reference:
53-
#feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
53+
feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
5454
# Frozen MacOS nrfutil location, this uses a frozen or pre-built standalone
5555
# version of nrfutil included in the BSP (no manual install required):
56-
feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil
56+
#feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil
5757

5858
feather52.menu.debug.l0=Level 0 (Release)
5959
feather52.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0

tools/nrfutil-0.5.2/nordicsemi/dfu/init_packet.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ def generate_packet(self):
7979
format_string = self.__generate_struct_format_string()
8080
args = []
8181

82-
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
83-
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
82+
# If you got error message AttributeError: 'int' object has no attribute 'value'.
83+
# Uncomment line 84 and comment out line 85 and run 'python setup.py install'
84+
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
85+
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
8486
# Add length to fields that required that
8587
if key in [PacketField.REQUIRED_SOFTDEVICES_ARRAY,
8688
PacketField.OPT_DATA]:
@@ -95,8 +97,10 @@ def __generate_struct_format_string(self):
9597
format_string = "<" # Use little endian format with standard sizes for python,
9698
# see https://docs.python.org/2/library/struct.html
9799

98-
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
99-
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
100+
# If you got error message AttributeError: 'int' object has no attribute 'value'.
101+
# Uncomment line 102 and comment out line 103 and run 'python setup.py install'
102+
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
103+
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
100104
if key in [PacketField.DEVICE_TYPE,
101105
PacketField.DEVICE_REVISION,
102106
]:

0 commit comments

Comments
 (0)