VS-CODE: build hangs: "Found GnuLd: ld.bfd..."

I am having a recurring problem with NFC-CONNECT: build action. It hangs when building. Gets stuck with the following message in lower-right hand corner of screen:

The procedure I've found to get around this is to cancel the build, and then open a shell in the app directory and do the following:

% rm -rf build*
% export ZEPHYR_BASE=/opt/nordic/ncs/v2.6.0/zephyr
% west build -b nrf52840dk_nrf52840 -p

I can then use the build & build pristine actions.

It might be my environment is not fully supported. The `app` is stand-alone. There is an out-of-the tree module with source i reference with the following CMakeLists.txt fragment:

cmake_minimum_required(VERSION 3.20.0)

set(my-module "${CMAKE_CURRENT_SOURCE_DIR}/../my-module")
set(EXTRA_ZEPHYR_MODULES ${my-module})

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

This module includes (via settings) board_root, dts_root, & soc_root,  as well as source, library, and include trees picked up from cmake + kconfig variables.

The build environment: Apple M1 Mac, MacOS: 12.6.7 (Monterey), VS-Code: v1.88.1, NRF-Connect: v2024.3.25

The Welcome tab shows SDK + Toolchain: v2.6.0. (I also use stock Zephyr to compile for non-Nordic boards, but am selecting proper SDK + toolchain, and have even removed `.west` directory for stock zephyr installation). 

Sorry to keep complaining about a great tool, but it's frustrating when it stops working.

Thanks. Kent

Parents
  • Same issue for me :( 
    Is there a reason why it cannot be fixed?

  • Hi

    The main issue we haven't been able to provide a fix for this is because we can not reproduce this on our end, and none of the suggestions in this ticket has helped us reproducing it.

    If anyone has logs of the issue occurring on NCS and toolchain v3.0.0 or newer we would be happy to look further into this.

    Best regards,

    Simon

  • Hey Matt,
    We had this issue for a few months but it eventually went away because VSCode and NCS toolchain got updates.

    1. The first thing to check is that your Mac, VSCode and NCS are all on the latest version. Update everything. 
    2. For a while we even had 2 installs of VSCode just to test versions against each other to ensure the issue was really resolved.
    3. *Note* that for the latest NCS and toolchain, you will NOT be using nRF Connect for Desktop to do the install anymore. In case you missed that changeover you might be stuck a few versions behind. The new install process is directly within VSCode using the "nFR Connect for VSCode" plugin.
    4. Also to check --- in some cases the tool (or the user) accidentally installed the Intel (x64) toolchain on Arm based Macs (arm64) or vice-versa. Just double check that all your tools are for the correct architecture that you are using.

    ~R

Reply
  • Hey Matt,
    We had this issue for a few months but it eventually went away because VSCode and NCS toolchain got updates.

    1. The first thing to check is that your Mac, VSCode and NCS are all on the latest version. Update everything. 
    2. For a while we even had 2 installs of VSCode just to test versions against each other to ensure the issue was really resolved.
    3. *Note* that for the latest NCS and toolchain, you will NOT be using nRF Connect for Desktop to do the install anymore. In case you missed that changeover you might be stuck a few versions behind. The new install process is directly within VSCode using the "nFR Connect for VSCode" plugin.
    4. Also to check --- in some cases the tool (or the user) accidentally installed the Intel (x64) toolchain on Arm based Macs (arm64) or vice-versa. Just double check that all your tools are for the correct architecture that you are using.

    ~R

Children
No Data
Related