nRF Connect for VSCode does not recognize host toolchain when building for native_sim on Linux

Using VSCode with nRF Connect extension on Ubuntu Linux 22/04 with nRF SDK 3.0.1 and nRF Toolchain 3.0.1 installed

I can create a build configuration for Zephyr's hello_world sample app to build for the native_sim board and build without any issue but the IDE extension keeps asking for a pristine build afterwards despite no build errors being reported. In the VSCode output console (where extensions print log info) it  keeps on printing "Unable to find the toolchain at path: /usr/bin/gcc" like this.

[13:57:28] west build --build-dir /home/nicolaslebedenco/Geotab/gemini/external/zephyr/samples/hello_world/build /home/nicolaslebedenco/Geotab/gemini/external/zephyr/samples/hello_world --pristine --board native_sim/native/64 --sysbuild --
[13:57:36] Success.
[13:57:36] ========== Stale build configuration (hello_world - build/hello_world) ==========
[13:57:36] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:36] ========== Stale build configuration (hello_world - build/hello_world) ==========
[13:57:36] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:36] ========== Stale build configuration (hello_world - build) ==========
[13:57:36] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:36] ========== Stale build configuration (hello_world - build/hello_world) ==========
[13:57:36] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:36] ========== Stale build configuration (hello_world - build/hello_world) ==========
[13:57:36] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:37] ========== Stale build configuration (hello_world - build) ==========
[13:57:37] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:37] ========== Stale build configuration (hello_world - build/hello_world) ==========
[13:57:37] Unable to find the toolchain at path: /usr/bin/gcc
[13:57:37] ========== Stale build configuration (hello_world - build) ==========
[13:57:37] Unable to find the toolchain at path: /usr/bin/gcc


The problem is that since the extension is not convinced that the project was built it hides all action buttons. All I get is this:




so it becomes impossible to debug/run without having to resort to custom launch commands or manually configuring gdb which defeats the purpose of using the extension in the first place.



Related