Problems with sparkfun nrf52840

I followed the sparkfun guide (https://learn.sparkfun.com/tutorials/nr … e-nrf5-sdk) step by step but when i do make bootload i get the following errors:Kindly guide me how to solve this error.

C:\nRF5\nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\sparkfun_nrf52840_mini\blank\armgcc>mingw32-make bootload SERIAL_PORT=COM7

Packaging _build/nrf52840_xxaa.hex

adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip

process_begin: CreateProcess(NULL, adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip, …) failed.

make (e=2): The system cannot find the file specified.

Makefile:151: recipe for target ‘dfu-package’ failed

mingw32-make: *** [dfu-package] Error 2

$ make bootload SERIAL_PORT=COM6

C:/Program Files/Git/usr/bin/sh.exe

Packaging _build/nrf52840_xxaa.hex

adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex

_build/dfu-package.zip

process_begin: CreateProcess(NULL, adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip, …) failed.

make (e=2): The system cannot find the file specified.

make: *** [Makefile:154: dfu-package] Error 2

Same problem here. anyone can help?

Greetings, Redanb and Hermes. I apologize for the delay in response here.

SparkFun will look into this issue and see if we can fix it on our end. In the meantime, it does look like some fixed exist. Consider looking at the comments section here and try what Member 551246 did:

https://learn.sparkfun.com/tutorials/nr … 58802abb03

"Hi,

I had the same issue until I added the path of adafruit-nrfutil to my environment path of windows, following this :

https://www.architectryan.com/2018/03/1 … indows-10/

Hope it helped."

Let me know if y’all are still having issues.

Hello,

I am having the same issue with Adafruit programming with this statement put into the makefile as suggested.

bootload: $(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex dfu-package

@echo Flashing: $<

adafruit-nrfutil --verbose dfu serial --package .\dfu-package.zip -p $(SERIAL_PORT) -b 115200 --singlebank --touch 1200

The error I am getting is:

C:\nRF5\nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\sparkfun_nrf52840_mini\blank\armgcc>make bootload SERIAL_PORT=4

Packaging _build/nrf52840_xxaa.hex

adafruit-nrfutil dfu genpkg --sd-req 0xFFFE --dev-type 0x0052 --application _build/nrf52840_xxaa.hex _build/dfu-package.zip

Zip created at _build/dfu-package.zip

Flashing: _build/nrf52840_xxaa.hex

adafruit-nrfutil --verbose dfu serial --package .\dfu-package.zip -p 4 -b 115200 --singlebank --touch 1200

Upgrading target on 4 with DFU package C:\nRF5\nRF5_SDK_15.3.0_59ac345\examples\peripheral\blinky\sparkfun_nrf52840_mini\blank\armgcc\dfu-package.zip. Flow control is disabled, Single bank, Touch 1200

Failed to upgrade target. Error is: Serial port could not be opened on 4. Reason: could not open port ‘4’: FileNotFoundError(2, ‘The system cannot find the file specified.’, None, 2)

Traceback (most recent call last):

File “c:\python37\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py”, line 99, in open

touch_port = Serial(port=self.com_port, baudrate=self.touch, rtscts=self.flow_control, timeout=self.timeout)

File “c:\python37\lib\site-packages\serial\serialwin32.py”, line 31, in init

super(Serial, self).init(*args, **kwargs)

File “c:\python37\lib\site-packages\serial\serialutil.py”, line 240, in init

self.open()

File “c:\python37\lib\site-packages\serial\serialwin32.py”, line 62, in open

raise SerialException(“could not open port {!r}: {!r}”.format(self.portstr, ctypes.WinError()))

serial.serialutil.SerialException: could not open port ‘4’: FileNotFoundError(2, ‘The system cannot find the file specified.’, None, 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “c:\python37\lib\site-packages\nordicsemi_main_.py”, line 294, in serial

dfu.dfu_send_images()

File “c:\python37\lib\site-packages\nordicsemi\dfu\dfu.py”, line 235, in dfu_send_images

self._dfu_send_image(HexType.APPLICATION, self.manifest.application)

File “c:\python37\lib\site-packages\nordicsemi\dfu\dfu.py”, line 157, in _dfu_send_image

self.dfu_transport.open()

File “c:\python37\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py”, line 101, in open

raise NordicSemiException(“Serial port could not be opened on {0}. Reason: {1}”.format(self.com_port, e))

nordicsemi.exceptions.NordicSemiException: Serial port could not be opened on 4. Reason: could not open port ‘4’: FileNotFoundError(2, ‘The system cannot find the file specified.’, None, 2)

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.

Please upgrade the Bootloader or select correct version in Tools->Bootloader.

  • Baud rate must be 115200, Flow control must be off.

  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

I am able to re-program the nRF52840 using the nRF Connect desktop at this point I would just like to start over but I cannot find the original Bluefruit bootloader .hex file so that I can re-flash the nRF52840 Mini. I have looked on Github without success, I have looked at Adafruit without success, they have the Feather bootloader available for the nRF52840 and I have tried that but as you can see above the message is “Bootloader version does not match the one on Bluefruit device”.

A link to where I can find the original bootloader on the Sparkfun nRF52840 Mini would be appreciated.

Thanks.

yes, where to find the original botloader for this board, please.

I’ve had similar problems with the make command and see that not a lot of work is done solving your issues. That’s unfortunate. I might be able to offer some help by explaining how I solved my make errors:

The visual studio code terminal is somewhat limited. I got more informative results about the error when using the windows command prompt.

I had an issue that the _build directory was not created. When I created it manually, the make could continue and resulted in a Error -1073741515 for me. Which is a general Windows error to indicate a missing file. The window command prompt then told me that the missing file was msys-intl-8.dll. I don’t know what, where or whatever. Installing MingGW and installing the msys-base.bin package (and then pointing to the bin folder in the path environment variable) solved all make issues for me.