West Flash Error - exit status 63 - MacOS

I have successfully compiled my project using `west build` and now I am trying to load it onto my nrf5340 board I recently purchased. Here's what I'm doing:

- From the same directory I built the project using `west build`, I am running `west flash`

- My board is plugged in to my PC with 2 micro-USB cables, 1 for power (switch is on, green light is one), and 1 for interface.

- I installed the latest SEGGER software.

When I run `nrfjprog --recover` it seems to work fine with the following output:

heal@Jedediahs-MacBook-Air le-audio % nrfjprog --recover
Recovering device. This operation might take 30s.
Writing image to disable ap protect.
Erasing user code and UICR flash areas.

When I run `west flash` it fails with the following output:

heal@Jedediahs-MacBook-Air le-audio % west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner nrfjprog
ERROR: An internal error has occurred, please try again.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 63: nrfjprog --ids

Versions:

nrfConnect v 3.7.0

Toolchain Manager v 0.10.0

nrf sdk v 1.7.0

  • Hello,

    I have reproduced this, but I do not have an explanation for it. However, a functional workaround seems to be to program using nrfjprog directly instead.

    for net core (adjust path if needed):

    nrfjprog --program build/hci_rpmsg/zephyr.hex --recover --coprocessor CP_NETWORK

    For app core (adjust path if needed):

    nrfjprog --program build/zephyr/zephyr.hex --recover

  • Hi,

    I had the same issue... The solution for me was to set ZEPHYR_BASE variable.

    In my case using nrf sdk 1.7.0, it's:

    export ZEPHYR_BASE=/opt/nordic/ncs/v1.7.0/zephyr

    That seems to solve the issue. For a more permanent solution maybe include that on your bash profile or whatever terminal you use...

    Although in VS Code, I'm still having "FATAL ERROR: command exited with status 63:" even with that variable set...

  • There are some incompatibilities between M1 and Intel tools which causes this. For now, you should use Intel versions of all tools. That means:

    • VS Code
    • nRF Command line tools: Here you need to run version 10.13.0 on M1 due to an issue with 10.14.0. This should be fixed in 10.15.0 when that is released.
    • J-Link software from Segger

    Other relevant tools are only Intel if you install using the toolchain manager.

Related