Hi, I've been trying to get the example flashing light working with tinygo and the nRF52840 USB Dongle.
When I run tinygo flash -target=pca10059 ./main.go I get the following output:
Traceback (most recent call last):
File "nordicsemi/__main__.py", line 1555, in <module>
File "click/core.py", line 1137, in __call__
File "click/core.py", line 1062, in main
File "click/core.py", line 1668, in invoke
File "click/core.py", line 1668, in invoke
File "click/core.py", line 1404, in invoke
File "click/core.py", line 763, in invoke
File "nordicsemi/__main__.py", line 1032, in usb_serial
File "nordicsemi/__main__.py", line 982, in do_serial
File "nordicsemi/dfu/dfu.py", line 69, in __init__
File "nordicsemi/dfu/package.py", line 671, in unpack_package
File "nordicsemi/dfu/manifest.py", line 200, in from_json
TypeError: Manifest.__init__() got an unexpected keyword argument 'dfu_version'
[85994] Failed to execute script '__main__' due to unhandled exception!
% nrfutil list
Command Version Description
nrf5sdk-tools 1.0.1 nRF5 SDK tools that were available in nRF Util 6
dfu
keys
pkg
settings
zigbee
Found 1 installed command(s)
I noticed the manifest.json inside of the package ZIP file generated by Go includes the following content:
whereas if I generate the package ZIP with the command that replaces, i.e. nrfutil pkg generate --hw-version 52 --sd-req 0x0 --application application.bin --application-version 1 package.zip then it generates much simpler manifest.json:
Note this does not include the dfu_version attribute that nrfutil complained about.
That ZIP then works and I've managed to flash my device for the first time!
It's my first time working in this space, happy to help try to fix this with a PR, but wanted to open the issue first in case I'm advertently using incorrect tooling.
Hi, I've been trying to get the example flashing light working with
tinygo
and thenRF52840
USB Dongle.When I run
tinygo flash -target=pca10059 ./main.go
I get the following output:I'm running this version of
nrfutil
downloaded from https://www.nordicsemi.com/Products/Development-tools/nrf-util:and have installed the
nrf5sdk-tools
package:I noticed the
manifest.json
inside of the package ZIP file generated by Go includes the following content:whereas if I generate the package ZIP with the command that replaces, i.e.
nrfutil pkg generate --hw-version 52 --sd-req 0x0 --application application.bin --application-version 1 package.zip
then it generates much simplermanifest.json
:Note this does not include the
dfu_version
attribute thatnrfutil
complained about.That ZIP then works and I've managed to flash my device for the first time!
It's my first time working in this space, happy to help try to fix this with a PR, but wanted to open the issue first in case I'm advertently using incorrect tooling.
The code that generates the
manifest.json
looks to be here https://github.com/tinygo-org/tinygo/blob/731532cd2b6353b60b443343b51296ec0fafae09/builder/nrfutil.go#L15-L24CC @deadprogram @aykevl who I think made the last change in this space?