You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow the getting started tutorial.. like insstall dependencies, west, requirements, install SDK, ...
Build using this command
west build -p always -b 96b_neonkey samples/basic/blinky
And here is the full build log...
ubuntu@DESKTOP-0DMMSRG:~/lab/zephyrproject/zephyr$ west build -p always -b 96b_neonkey samples/basic/blinky
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/ubuntu/lab/zephyrproject/zephyr/samples/basic/blinky
-- CMake version: 3.30.2
-- Found Python3: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /home/ubuntu/.cache/zephyr
-- Zephyr version: 3.7.99 (/home/ubuntu/lab/zephyrproject/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: 96b_neonkey, qualifiers: stm32f411xe
-- Found host-tools: zephyr 0.16.3 (/home/ubuntu/zephyr-sdk-0.16.3)
-- Found toolchain: host (clang/ld)
-- Found Dtc: /home/ubuntu/zephyr-sdk-0.16.3/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/ubuntu/lab/zephyrproject/zephyr/boards/96boards/neonkey/96b_neonkey.dts
-- Generated zephyr.dts: /home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/dts.cmake
Parsing /home/ubuntu/lab/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/ubuntu/lab/zephyrproject/zephyr/boards/96boards/neonkey/96b_neonkey_defconfig'
Merged configuration '/home/ubuntu/lab/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /usr/bin/ld.bfd (found version "2.38")
-- The C compiler identification is Clang 16.0.0
-- The CXX compiler identification is Clang 16.0.0
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /clang16/bin/clang
-- Using ccache: /usr/bin/ccache
-- Looking for xtensa/config/core-isa.h
-- Looking for xtensa/config/core-isa.h - not found
-- Configuring done (12.2s)
-- Generating done (0.1s)
-- Build files have been written to: /home/ubuntu/lab/zephyrproject/zephyr/build
-- west build: building application
[1/1075] Preparing syscall dependency handling
[41/1075] Generating include/generated/zephyr/version.h
-- Zephyr version: 3.7.99 (/home/ubuntu/lab/zephyrproject/zephyr), build: v3.7.0-1787-gc4e3afe621bf
[1070/1075] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/zephyr_pre0.map
: && ccache /clang16/bin/clang --target=armv7m-none-eabi zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -fuse-ld=bfd -Wl,-T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/home/ubuntu/lab/zephyrproject/zephyr/build/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/picolibc/liblib__libc__picolibc.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/drivers/interrupt_controller/libdrivers__interrupt_controller.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/reset/libdrivers__reset.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/stm32/stm32cube/lib..__modules__hal__stm32__stm32cube.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L -L/home/ubuntu/lab/zephyrproject/zephyr/build/zephyr -lgcc zephyr/arch/common/libisr_tables.a --config /home/ubuntu/lab/zephyrproject/zephyr/cmake/toolchain/llvm/clang_libgcc.cfg -fshort-enums -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=none -mfloat-abi=soft -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie modules/picolibc/libc.a -lgcc && cd /home/ubuntu/lab/zephyrproject/zephyr/build/zephyr && /usr/bin/cmake -E true
/usr/bin/ld.bfd: target elf32-littlearm not found
clang-16: error: ld.lld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/ubuntu/lab/zephyrproject/zephyr/build
I think that the compiler didn't find cross-compile ld.bfd binutil itself, but I don't know how to specify linkers etc including ld.bfd for cross compilation explicitly.
I've aleady check some issues/discussions but I cannot get any help. (Only related issue: #61805)
Can someone help me how to build successfully with LLVM compiler?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to build sample blinky project in zephyr according to this tutorial, but with LLVM, I cannot build it.
This is what I did:
And here is the full build log...
I think that the compiler didn't find cross-compile ld.bfd binutil itself, but I don't know how to specify linkers etc including ld.bfd for cross compilation explicitly.
I've aleady check some issues/discussions but I cannot get any help. (Only related issue: #61805)
Can someone help me how to build successfully with LLVM compiler?
Beta Was this translation helpful? Give feedback.
All reactions