Thank you for reply;
Try updating your nrfjprog to the latest version (10.15.0). nRF Command Line Tools
Updated:
bartek@iMac open_bootloader % nrfjprog --version
nrfjprog version: 10.15.0 external
JLinkARM.dll version: 6.88a
If, when you update nrfjprog, you still get the same error, are you sure you are using the correct serial port?
bartek@iMac open_bootloader % system_profiler SPUSBDataType
Open DFU Bootloader:
Product ID: 0x521f
Vendor ID: 0x1915 (Nordic Semiconductor ASA)
Version: 1.00
Serial Number: D28CF7D29DCC
Speed: Up to 12 Mb/s
Manufacturer: Nordic Semiconductor
Location ID: 0x14320000 / 35
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
bartek@iMac open_bootloader % ls /dev | grep D28
cu.usbmodemD28CF7D29DCC1
tty.usbmodemD28CF7D29DCC1
bartek@iMac open_bootloader % ls /dev | grep usb
cu.usbmodemD28CF7D29DCC1
tty.usbmodemD28CF7D29DCC1
These are ports related to the nrf USB (3), I am sure I am using proper port.
Ok, perhaps there is something else using the USB port? Do you have it selected in nRF Connect for Desktop, some USB terminal or something other than for nrfutil? Try power cycling the board right before you call the "nrfutil dfu usb-serial ..." command to make sure. Can you try using python 3.8? I see that you are currently using 3.7.
BR,
Edvin
I had to switch to other project, and today I came back to the bootloader, and everything worked fine. I have tried to do it in a number of different ways and no issues occurred.
Maybe there was some MacOS update in the meanwhile, so seems it could be an OS issue.
I have tried programming the nrf without merging bootloader with the settings:
mergehex --merge settings.hex _build/nrf52840_xxaa_debug.hex --output output.hex.
Here is my question: what is the difference between these two approaches? I have only noticed the black memory blocks have different size:
block sizes from top when using output.hex file (bootloader + settings): 135; 92; 135; 92 (described as MBR parameters);
block sizes from top when using bootloader file without settings: 292; 92; 292; 92 (described as MBR parameters);
fizyk said:what is the difference between these two approaches?
What exactly are "these two approaches"? Programming with and without merging? Or with or without settings?
With or without merging shouldn't be a difference. It may be that nRF Connect for desktop is confused if they are written as one file or not when you read it back, but if you read back the hex file using "nrfjprog --readcode flashdump.hex", it shouldn't be any difference.
With or without settings:
If you don't program bootloader settings, then the bootloader will generate it's own settings. It may be that the size of the default settings is different from the settings generated from nrfutil.
BR.
Edvin