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

  • This problem was gone for me for a few months but has reappeared in the last 2 weeks. Quitting and reopening VS Code is the only solution I've found, which is quite an inconvenience.

  • Hi

    The working theory as to why we haven't been able to reproduce this is that there is an incorrect version of the VS Code extensions or J-Link on your computer. Uninstalling the SDK and toolchain and reinstalling again should work AFAIK.

    Best regards,

    Simon

  • I'm having this issue show up again last week; my VS Code extension is set to auto-update and appears to be fully updated. J-Link was updated 3 weeks ago, no known changes in that time to the SDK/toolchain.

    I don't see why a version of J-Link would impact the build process.

    Is there anything specific you'd recommend or want me to try? This was a regular issue for much of 2024, I stayed with a VS Code version prior to 1.86 until about a month or two, which I then updated everything and had no issues until most of last week. 

  • We think this might be due to a mismatch between the VS Code extension version and J-Link versions installed on your computer, since we still have not been able to reproduce this on our end. Can you share exactly what version of the extension and J-Link firmware installed & used on your computer with these issues.

    Also, what kind of computer are you working on, Apple or Intel based? On Apple devices, you should install the universal version of VS Code from VS Code's pages, as the Toolchain Manager in the nRF Connect for Desktop app installs an Intel based toolchain by default if I recall correctly.

    Best regards,

    Simon

Related