This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem adding nrfjprog command line tools to PATH (Toolchain Manager)

I'm having a hard time getting nrfjprog to remain in my PATH env variable when using the Toolchain manager. I am following this post -- I am able to `echo` my PATH variable after my export command. However, whenever I close down the terminal and use the Toolchain manager to open up the terminal again, all of my PATH variables from before (nrfjprog and mergehex) are gone. Also, all of my system PATH variables don't exist in this terminal window that was opened from the Toolchain manager. If I echo PATH in a fresh terminal window (opened from spotlight) my list is much different than what I see when I echo PATH in the terminal opened from the Toolchain manager. What am I missing here? I don't want to export new PATH variables every time I want to flash my Zephyr project.

Parents
  • Hi,

    Typically the toolchain manager will simply add it's own paths to before the system environment path. Like this:

    What does it look like with you?

    Kenneth

  • I am on macOS and here's what my PATH variable contains when I use the toolchain manager to open a terminal instance. 

    Here is what my PATH variable contains when I open a new terminal instance from my desktop. 

    I can add the two tools to my PATH in the terminal instance that I opened using the Toolchain manager using these two commands: 

    export PATH="/Users/ericpietrowicz/documents/nRF-Command-Line-Tools_10_13_0/nrfjprog/:$PATH"
    export PATH="/Users/ericpietrowicz/documents/nRF-Command-Line-Tools_10_13_0/mergehex/:$PATH"

    This allows me to successfully compile sample applications. But, when I close the instance and re-open it the PATH resets back to the above screenshot. 

Reply
  • I am on macOS and here's what my PATH variable contains when I use the toolchain manager to open a terminal instance. 

    Here is what my PATH variable contains when I open a new terminal instance from my desktop. 

    I can add the two tools to my PATH in the terminal instance that I opened using the Toolchain manager using these two commands: 

    export PATH="/Users/ericpietrowicz/documents/nRF-Command-Line-Tools_10_13_0/nrfjprog/:$PATH"
    export PATH="/Users/ericpietrowicz/documents/nRF-Command-Line-Tools_10_13_0/mergehex/:$PATH"

    This allows me to successfully compile sample applications. But, when I close the instance and re-open it the PATH resets back to the above screenshot. 

Children
Related