diff --git a/boards.txt b/boards.txt index 9a7d9780..a5005ee7 100644 --- a/boards.txt +++ b/boards.txt @@ -50,10 +50,10 @@ feather52.build.nrfutil=nrfutil feather52.build.nrfutil.windows={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe # Legacy MacOS nrfutil location, this is for when people had it globally # installed and is left just for reference: -#feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil +feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil # Frozen MacOS nrfutil location, this uses a frozen or pre-built standalone # version of nrfutil included in the BSP (no manual install required): -feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil +#feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil feather52.menu.debug.l0=Level 0 (Release) feather52.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0 diff --git a/tools/nrfutil-0.5.2/nordicsemi/dfu/init_packet.py b/tools/nrfutil-0.5.2/nordicsemi/dfu/init_packet.py index 96444094..ccf8c347 100644 --- a/tools/nrfutil-0.5.2/nordicsemi/dfu/init_packet.py +++ b/tools/nrfutil-0.5.2/nordicsemi/dfu/init_packet.py @@ -79,8 +79,10 @@ class Packet(object): format_string = self.__generate_struct_format_string() args = [] - #for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value): - for key in sorted(self.init_packet_fields.keys(), key=lambda x: x): + # If you got error message AttributeError: 'int' object has no attribute 'value'. + # Uncomment line 84 and comment out line 85 and run 'python setup.py install' + #for key in sorted(self.init_packet_fields.keys(), key=lambda x: x): + for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value): # Add length to fields that required that if key in [PacketField.REQUIRED_SOFTDEVICES_ARRAY, PacketField.OPT_DATA]: @@ -95,8 +97,10 @@ class Packet(object): format_string = "<" # Use little endian format with standard sizes for python, # see https://docs.python.org/2/library/struct.html - #for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value): - for key in sorted(self.init_packet_fields.keys(), key=lambda x: x): + # If you got error message AttributeError: 'int' object has no attribute 'value'. + # Uncomment line 102 and comment out line 103 and run 'python setup.py install' + #for key in sorted(self.init_packet_fields.keys(), key=lambda x: x): + for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value): if key in [PacketField.DEVICE_TYPE, PacketField.DEVICE_REVISION, ]: