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
  • I am also having this issue issue - hanging on the ld.bfd step when building Matter light_bulb sample with v.2.6.1 of the SDK and toolchain in VSCode on an M1 Mac.

    Here is my terminal output when doing the build configuration:

    Building light_bulb_2.6
    west build --build-dir /Users/ydr/dev/nordic/light_bulb_2.6/build /Users/ydr/dev/nordic/light_bulb_2.6 --pristine --board nrf5340dk_nrf5340_cpuapp --no-sysbuild --cmake-only -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/Users/ydr/dev/nordic;/Users/ydr/dev/nordic/light_bulb_2.6
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/ydr/dev/nordic/light_bulb_2.6
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /Users/ydr/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: /Users/ydr/dev/nordic/light_bulb_2.6/boards/nrf5340dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: /Users/ydr/dev/nordic/light_bulb_2.6/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/ydr/dev/nordic/light_bulb_2.6/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/ydr/dev/nordic/light_bulb_2.6/build/zephyr/dts.cmake
    Parsing /Users/ydr/dev/nordic/light_bulb_2.6/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration '/Users/ydr/dev/nordic/light_bulb_2.6/prj.conf'
    Configuration saved to '/Users/ydr/dev/nordic/light_bulb_2.6/build/zephyr/.config'
    Kconfig header saved to '/Users/ydr/dev/nordic/light_bulb_2.6/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 

    If I switch back to 2.5.3 SDK and toolchain it builds fine.

    All SDKs and toolchains are being installed and managed from within VS Code.

    I wish I could provide you a support information dump, but executing that command within VSCode generates an error as well.

    Would love to help you, Nordic team, to figure out why the ld.bfd step is hanging so we can figure out how to fix it. We want to move to 2.6 of the SDK because of some new Matter capabilities available there. Thanks! Dan.

  • Can you also provide the version of MacOS, and if installed, what version of nrfutil you have installed.

    Best regards,

    Simon

  • Please send the support info again in PMs if you don't want to upload it here.

    Best regards,

    Simon

  • Hi Simon - sent a few days ago... let me know if you received it OK. Thanks! Dan.

  • HI Simon - checking in here... did you receive my "generate support" info via PM and are there any clues as to why the build is hanging on the ld.bfd step? Thanks! Dan.

  • Hi Dan

    Our devs have some follow ups: Why are you using an Intel based toolchain on Apple Silicon? Please describe how you installed the extension and try installing an Apple Silicon version of the toolchain or the universal VS code version if that's not done already. Please remove all Intel based toolchains, and then install what is needed directly from the VS code extension.

    Best regards,

    Simon

  • Hi Simon - I removed all old versions of the SDK and toolchain and tried again with SDK 2.7 and it works - thanks for your help!

Reply Children
No Data
Related