This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't make flash.

I've been trying to set up my nRF52 DK on my mac OS.

I followed all the steps to download the SDK (15.0.0), the Command Line Tools, the ARM GCC toolchain, and the J-Link Software and Documentation.

I even edited the path for the Makefile.posix

And set a $PATH for mergehex and nrfjprog.

I assume thats everything.

I plugged in the DK via USB and turned it on

I opened a terminal at armgcc folder in the blink example

Here is the result:

Jeromes-MacBook-Air:armgcc jerome$ make
mkdir _build
cd _build && mkdir nrf52832_xxaa
Assembling file: gcc_startup_nrf52.S
Compiling file: main.c
Compiling file: boards.c
Compiling file: app_error.c
Compiling file: app_error_handler_gcc.c
Compiling file: app_error_weak.c
Compiling file: app_util_platform.c
Compiling file: nrf_assert.c
Compiling file: nrf_strerror.c
Compiling file: system_nrf52.c
Linking target: _build/nrf52832_xxaa.out
   text	   data	    bss	    dec	    hex	filename
   2076	    108	     28	   2212	    8a4	_build/nrf52832_xxaa.out
Preparing: _build/nrf52832_xxaa.hex
Preparing: _build/nrf52832_xxaa.bin
DONE nrf52832_xxaa
Jeromes-MacBook-Air:armgcc jerome$ make flash
Flashing: _build/nrf52832_xxaa.hex
nrfjprog -f nrf52 --program _build/nrf52832_xxaa.hex --sectorerase
make: nrfjprog: No such file or directory
make: *** [flash] Error 1

Not really sure how to fix this.

I'm out of ideas on how to get it up and running. I just want to start programming.  Could really use the help.

  • I also had some problems setting up the toolchain, and while I did not encounter exactly your problem, it might help to suggest some of the unusual things I had to do to set it up (on linux):

    1. did you also change the GNU_PREFIX in the Makefile.posix?

    GNU_PREFIX ?= arm-none-eabi

    2. to be sure you can create a link to nrfjprog in your systems binary folder.

    3. probably also some library issues. during my installation i found this post:

    Adding the libjlinkarm.so to /usr/lib can be done with ln command; Enter /usr/lib, type: > ln -s {/path/to/segger-lib-file-name} {segger-lib-file-name}

    4. did you check that the file _build/nrf52832_xxaa.hex inside your local folder really exists?

    just some ideas, good luck with it.

  • Hello,

    1. I noticed in the toolchain folder I didn't have certain files listed in the folders.  The posix was changed, however I noticed that in tutorials it shows GNU_PREFIX := and in my posix I have GNU_PREFIX ?=

    2. I was under the impression that once set the $PATH for nrfjprog it could be accessed from anywhere. When I type in nrfjprog in the terminal I do get the full command menu listed, same with mergehex.

    3. I haven't tried that one yet.

    4. Yes the hex file in the build folder for the blinky example does exist there.

  • Hi Jerome,

    First I would like you to test your DK with a USB you are 100% sure that can transfer data.

    I see that you are using the "Jaybird" cable which for my understanding is used to charge the "jaybird headset". (I think you have a "charge-only" cable)

    Often such micro USB cables used to charge different products are missing the data lines, so they can only be used to power different devices.

    So if you have a smartphone that uses a micro USB cable, they are more likely to have the data lines as well.

     

    If that is not the case, I would suggest you to go through this list.

Related