Sparkfun nRF52832

sivi gravatar image

asked 2017-11-13 09:14:33 +0100

How to run the sdk examples from usb on the Sparkfun. I can run the adruino code, but want to shift to a more standard production environment. After manual install of GCC I can compile by "make" and when I run "make flush" get: make: * No rule to make target `flush'. Stop.

How this can be solved. My main target now is to run the blinky example from MacOS usb to the sparkfun Breakout board. Very new to this. So maybe there is some basic misconception. Thanks for the helpers

edit retag flag offensive close delete report spam


Have you tried with the command make flash? How have you connected the Sparkfun board to the computer?

Jørgen Holmefjord ( 2017-11-13 10:34:29 +0100 )editconvert to answer

Yes that is the command I used. From Usb port I use the SparkFun Beefy 3: FTDI FT231X USB to serial IC.

sivi ( 2017-11-13 11:55:24 +0100 )editconvert to answer

According to your post, the command you used was make flush, not make flash. You cannot program the chip using a serial adapter, you will need a SWD programmer/debugger. To use nrfjprog for programming, you will need a SEGGER J-Link debugger. On our nRF5x developent kits, there are on-board J-Link debugger that can be used for programming of external nRF devices.

Jørgen Holmefjord ( 2017-11-13 12:25:14 +0100 )editconvert to answer

So how it works to program it via adruino? Is the segger J-link connected via usb?

sivi ( 2017-11-13 12:31:09 +0100 )editconvert to answer

Arduino works because the board comes with a pre-programmed bootloader that allow updating the firmware using a serial connection. We provide the same capabilities for our SDK with our serial DFU, but I don't think the Sparkfun Arduino bootloader is compatible with our DFU implementation. You will need to flash the nRF52832 with out bootloader to enable updating of firmware over serial interface. I would recommend getting one of our nRF52-DK, and use the on-board J-Link to flash the external board.

Jørgen Holmefjord ( 2017-11-13 12:42:56 +0100 )editconvert to answer

Actually, it looks like the Sparkfun board is flashed with our legacy DFU serial bootloader from SDK 11. You might be able to program the examples from SDK 11 using nrfutil. Please read the documentation on serial DFU example in SDK 11 if you want to try this out.

Jørgen Holmefjord ( 2017-11-13 13:00:21 +0100 )editconvert to answer

Why not to flash it without the bootloader?

sivi ( 2017-11-13 13:10:09 +0100 )editconvert to answer

I understand that I can try versions from sdk 11 but not current (14) ? also if I want to flash it with 14 How is it being done?

sivi ( 2017-11-13 13:17:15 +0100 )editconvert to answer

tried your suggestion with sdk 11 and I get Flashing: _build/nrf52832_xxaa.hex nrfjprog --program _build/nrf52832_xxaa.hex -f nrf52 --chiperase ERROR: There is no debugger connected to the PC. make: * [flash] Error 41

sivi ( 2017-11-13 13:34:57 +0100 )editconvert to answer

You are trying to flash the application using nrfjprog. This is not the same as using nrfutil for updating the application using DFU. You need to create the DFU zip package and perform the DFU using nrfutil v0.5.2, as this is the last version supporting legacy DFU used by the bootloader on your board. You cannot use examples from SDK 14, as this will require updating the bootloader and softdevice, breaking the Arduino support.

I still recommend getting the development kit with the J-Link debugger, if you want to use examples from our SDK.

Jørgen Holmefjord ( 2017-11-13 16:09:15 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
sudhirkshirsagar gravatar image

answered 2017-11-14 00:40:39 +0100

I think the nRFGostudio can be used to wipe out the existing Sparkfun bootloader, and then use the Segger Embedded Studio to download the compiled binaries to the board. Unfortunately, I am still trying to figure that out.

edit flag offensive delete publish link more


This is correct, but you still need the SEGGER J-Link debugger/programmer for eraseing and programming the board.

Jørgen Holmefjord ( 2017-11-14 08:47:05 +0100 )editconvert to answer

Luckily the Sparkfun board has that built-in! I was able to get a couple of the examples running after I pieced all the info together.

Sudhir ( 2017-11-14 15:06:52 +0100 )editconvert to answer

What Sparkfun board are you using?

Jørgen Holmefjord ( 2017-11-14 15:09:40 +0100 )editconvert to answer

SparkFun nRF52832 Breakout In stock WRL-13990 I also procured the right SWD socket and cable. Soldering the socket was a bit tricky. Persistence paid off. Also the custom board definition had to be created. One of these days I will write a blog post somewhere.

Sudhir ( 2017-11-14 15:26:35 +0100 )editconvert to answer

There is no debugger on that board. There is a debug interface (SWD) that you can connect a debugger to for programming the board, but you still need an external debugger for programming. This is also shown in the Resources and Going Further section of the Sparkfun nRF52832 Breakout Board Hookup Guide.

Jørgen Holmefjord ( 2017-11-14 15:40:14 +0100 )editconvert to answer

You are correct. I used the nRF2 DK as the debugger to connect to the board. I meant that the Sparkfun board has the SWD.

Sudhir ( 2017-11-14 15:42:43 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2017-11-13 09:14:33 +0100

Seen: 143 times

Last updated: nov. 14 '17