Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8051

General • Re: vscode risc-v build problem.

$
0
0
[cmake] -- Found assembler: /home/brendan/.pico-sdk/toolchain/RISCV_ZCB_RPI_2_2_0_3/bin/riscv32-unknown-elf-gcc

[proc] The command: riscv32-unknown-elf-gcc -v failed with error: Error: spawn riscv32-unknown-elf-gcc ENOENT
[proc] The command: riscv32-unknown-elf-g++ -v failed with error: Error: spawn riscv32-unknown-elf-g++ ENOENT
Can't really help but it looks to me that it found the toolchain but then failed when it tried to issue a '-v' on the toolchain.

First thing I would do is see what running the same from the command line does -

Code:

/home/brendan/.pico-sdk/toolchain/RISCV_ZCB_RPI_2_2_0_3/bin/riscv32-unknown-elf-gcc -v

Code:

riscv32-unknown-elf-gcc -v
My guess would be that what you have doesn't accept '-v' or, when it tries that, 'riscv32-unknown-elf-gcc/g++' isn't found in the executable search path, maybe isn't executable, or really isn't there.

The Pico SDK Extension doesn't work on my Bookworm system, and I built my own RISC-V compiler as per the Getting Started guide, so it's in a different location to where the extension places things, but this works for me -

Code:

pi@Pi4B:~ $ riscv32-unknown-elf-gcc -vUsing built-in specs.COLLECT_GCC=riscv32-unknown-elf-gccCOLLECT_LTO_WRAPPER=/opt/riscv/gcc14-rp2350-no-zcmp/libexec/gcc/riscv32-unknown-elf/14.2.1/lto-wrapperTarget: riscv32-unknown-elfConfigured with: /home/pi/apps/riscv/riscv-gnu-toolchain/gcc-14/configure --target=riscv32-unknown-elf --prefix=/opt/riscv/gcc14-rp2350-no-zcmp --disable-shared --disable-threads --enable-languages=c,c++ --with-pkgversion=gb0dd13efca6 --with-system-zlib --enable-tls --with-newlib --with-sysroot=/opt/riscv/gcc14-rp2350-no-zcmp/riscv32-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/home/pi/apps/riscv/riscv-gnu-toolchain/gcc-14 --enable-multilib --with-multilib-generator='rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb-ilp32--;rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb-ilp32--' --with-abi=ilp32 --with-arch=rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb --with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-Os    -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-Os    -mcmodel=medlow'Thread model: singleSupported LTO compression algorithms: zlibgcc version 14.2.1 20240809 (gb0dd13efca6)

Statistics: Posted by hippy — Mon Dec 08, 2025 11:31 am



Viewing all articles
Browse latest Browse all 8051

Trending Articles