I'm currently setting up an environment in Visual Studio Code because the roadmap suggests going there.
I have experience with Segger and Nordic Segger and with Zephyr.
I have installed NCS 2.0.0 and Visual Studio Code 1.70.0. It's hard to find a complete guide how to setup the environment.
I'm using:
- Ubuntu 20.04 LTS.
- NCS 2.0.0
- NRF connect for desktop 3.11.1
- Visual Studio Code 1.70.0
- Toolchain Manager v1.1.3
- nrfutil version 5.2.0
- Zephyr SDK 0.14.2
I have used:
https://academy.nordicsemi.com/topic/exercise-1-1/
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html
https://www.zephyrproject.org/zephyr-developer-summit-getting-started-with-zephyr-rtos-videos/
I noticed that there are differences in configuration. What I also notice is that a lot of things change all the time. VScode plugins getting deprecated.
Environment variables no longer needed to be set.
This is one of the reasons I make a new post.
I also found:
RE: Building/Debugging with Zephyr SDK Toolchain in nRF Connect VS Code (Linux)
But unfortunately it did not work for me. It also does not have all the information I need. Like where is settings.json located? Do I need to create it?
I have no experience at all in Visual Studio Code. But I managed to install it, configure it and make the flash button work.
I managed to get blinky working on the Nordic DK board.
Debug button does not work. I get the following error message:GDB executable "arm-zephyr-eabi-gdb" was not found.
Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly.
Then I have to choose between "cancel" and "open 'launch.json'". launch.json is not the same as settings.json.
When I look at the previous post, I changed launch.json into:
But that did not work.
I also tried creating .vscode/settings.json with the following contents:
But that also did not work.
The previous post also suggested to set the environment variable GNUARMEMB_TOOLCHAIN_PATH in .bashrc
export GNUARMEMB_TOOLCHAIN_PATH=/home/ephimee/ncs_v2.0.0/v2.0.0/zephyr/cmake/toolchain/gnuarmemb
But this also did not work.
I also tried opening VScode via Toolchain manager and without Toolchain manager in all scenarios. That did not make a difference either.
What I did notice is that sometimes GNUARMEMB_TOOLCHAIN_PATH is set to zephyr and sometimes set to gnuarmemb.
If I search on the internet there's no real answer where it has to be set to because both seem to work for some users?
I hope there are more suggestions?