Skip to content

RP2350 Hello Universal ARM + RISC-V 2.1.1 and master #670

@5HT

Description

@5HT

Greetings!

Seems like broken build process for ARM/RISC-V Universal Binary using official master branches 2.1.1/sdk-2.1.1,
I'm using official documentation:

RISC-V toolchain:

sudo apt-get install autoconf automake autotools-dev curl python3 \
   python3-pip libmpc-dev libmpfr-dev libgmp-dev \
   gawk build-essential bison flex texinfo gperf \
   libtool patchutils bc zlib1g-dev libexpat-dev \
   ninja-build git cmake libglib2.0-dev libslirp-dev

sudo mkdir -p /opt/riscv/gcc14-rp2350-no-zcmp
sudo chown -R $(whoami) /opt/riscv/gcc14-rp2350-no-zcmp

git clone https://github.com/riscv/riscv-gnu-toolchain

cd riscv-gnu-toolchain

git submodule update --init --recursive

git clone https://github.com/gcc-mirror/gcc gcc-14 -b releases/gcc-14

export PATH="$PATH:/opt/riscv/gcc14-rp2350-no-zcmp/bin"
./configure \
  -prefix=/opt/riscv/gcc14-rp2350-no-zcmp \
  --with-arch=rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb \
  --with-abi=ilp32 \
  --with-multilib-generator="rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb-ilp32--;rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb-ilp32--" \
  --with-gcc-src=`pwd`/gcc-14

PICO SDK:

git clone git@github.com:raspberrypi/pico-sdk && cd pico-sdk
git checkout 2.1.1
git submodule update --init --recursive
mkdir build && cd build
cmake ..
make

Tools picotool and pioasm:

locate pioasm
locate piotool

/usr/local/bin/pioasm
/usr/local/lib/cmake/pioasm
/usr/local/lib/cmake/pioasm/pioasmConfig.cmake
/usr/local/lib/cmake/pioasm/pioasmConfigVersion.cmake
/usr/local/lib/cmake/pioasm/pioasmTargets-release.cmake
/usr/local/lib/cmake/pioasm/pioasmTargets.cmake

/usr/local/bin/picotool
/usr/local/lib/cmake/picotool
/usr/local/lib/cmake/picotool/picotoolConfig.cmake
/usr/local/lib/cmake/picotool/picotoolConfigVersion.cmake
/usr/local/lib/cmake/picotool/picotoolTargets-release.cmake
/usr/local/lib/cmake/picotool/picotoolTargets.cmake

PICO Examples:

git clone git@github.com:raspberrypi/pico-examples && cd pico-examples git checkout sdk-2.1.1 mkdir build && cd build

ARM went ok with disabled RISCV toolchain.

cmake -DPICO_BOARD=pico2 ..
make

When I enable RISCV_TOOLCHAIN

cmake -DPICO_BOARD=pico2 -DPICO_PLATFORM=rp2350-riscv \
      -DPICO_RISCV_TOOLCHAIN_PATH=/opt/riscv/gcc14-rp2350-no-zcmp \
      -DPICO_ARM_TOOLCHAIN_PATH=/usr \
      -DCMAKE_C_COMPILER=/opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc \
      -DCMAKE_CXX_COMPILER=/opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-g++ --trace-expand > cmake_trace.log 2>&1 ..

$ cmake -DPICO_BOARD=pico2 -DPICO_PLATFORM=rp2350-riscv \
PICO_RISCV_TOOLCHAIN_PATH=/opt/r>       -DPICO_RISCV_TOOLCHAIN_PATH=/opt/riscv/gcc14-rp2350-no-zcmp \
>       -DPICO_ARM_TOOLCHAIN_PATH=/usr \
>       -DCMAKE_C_COMPILER=/opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc \
>       -DPICO_EXAMPLES_PATH:FILEPATH=/home/tonpa/depot/bitedits/pico-examples \
Dpicotool_DIR=/u>       -Dpicotool_DIR=/usr/local/bin \
>       -Dpioasm_DIR=/usr/local/bin \
>       -DCMAKE_CXX_COMPILER=/opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-g++ ..
Using PICO_SDK_PATH from environment ('/home/tonpa/depot/bitedits/pico-sdk')
PICO_SDK_PATH is /home/tonpa/depot/bitedits/pico-sdk
Target board (PICO_BOARD) is 'pico2'.
Using board configuration from /home/tonpa/depot/bitedits/pico-sdk/src/boards/include/boards/pico2.h
Pico Platform (PICO_PLATFORM) is 'rp2350-riscv'.
-- Defaulting build type to 'Release' since not specified.
Defaulting compiler (PICO_COMPILER) to 'pico_riscv_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_riscv_gcc'
Defaulting PICO_GCC_TRIPLE to 'riscv32-unknown-elf;riscv32-corev-elf'
-- The C compiler identification is GNU 14.3.1
-- The CXX compiler identification is GNU 14.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
TinyUSB available at /home/tonpa/depot/bitedits/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /home/tonpa/depot/bitedits/pico-sdk/lib/btstack
cyw43-driver available at /home/tonpa/depot/bitedits/pico-sdk/lib/cyw43-driver
lwIP available at /home/tonpa/depot/bitedits/pico-sdk/lib/lwip
mbedtls available at /home/tonpa/depot/bitedits/pico-sdk/lib/mbedtls
Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set
Skipping encrypted example which is unsupported on this platform
Skipping hello_dcp example which is unsupported on this platform
Skipping cache_perfctr example which is unsupported on this platform
Skipping ssi_dma example which is unsupported on this platform
Skipping multicore_fifo_irqs example which is unsupported on this platform
Skipping RTC examples as hardware_rtc is unavailable on this platform
Skipping TinyUSB dual examples, as TinyUSB hw/mcu/raspberry_pi/Pico-PIO-USB submodule unavailable
Skipping FreeRTOS examples as FREERTOS_KERNEL_PATH not defined
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tonpa/depot/bitedits/pico-examples/build

If fails on 67%:

$ make > make_trace.log
[ 67%] Creating directories for 'hello_universal_rp2350-riscv'
[ 67%] No download step for 'hello_universal_rp2350-riscv'
[ 67%] No update step for 'hello_universal_rp2350-riscv'
[ 67%] No patch step for 'hello_universal_rp2350-riscv'
[ 67%] Performing configure step for 'hello_universal_rp2350-riscv'
Not searching for unused variables given on the command line.
PICO_SDK_PATH is /home/tonpa/depot/bitedits/pico-sdk
Defaulting target board (PICO_BOARD) to 'pico2' since not specified.
Using board configuration from /home/tonpa/depot/bitedits/pico-sdk/src/boards/include/boards/pico2.h
Pico Platform (PICO_PLATFORM) is 'rp2350-riscv'.
-- Defaulting build type to 'Release' since not specified.
Defaulting compiler (PICO_COMPILER) to 'pico_riscv_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_riscv_gcc'
Defaulting PICO_GCC_TRIPLE to 'riscv32-unknown-elf;riscv32-corev-elf'
-- The C compiler identification is GNU 14.3.1
-- The CXX compiler identification is GNU 14.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/riscv/gcc14-rp2350-no-zcmp/bin/riscv32-unknown-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
TinyUSB available at /home/tonpa/depot/bitedits/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /home/tonpa/depot/bitedits/pico-sdk/lib/btstack
cyw43-driver available at /home/tonpa/depot/bitedits/pico-sdk/lib/cyw43-driver
lwIP available at /home/tonpa/depot/bitedits/pico-sdk/lib/lwip
mbedtls available at /home/tonpa/depot/bitedits/pico-sdk/lib/mbedtls
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tonpa/depot/bitedits/pico-examples/build/universal/hello_universal/rp2350-riscv/wrapper
[ 67%] Performing build step for 'hello_universal_rp2350-riscv'
Scanning dependencies of target bs2_default
[  1%] Building ASM object pico-sdk/src/rp2350/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.o
[  2%] Linking ASM executable bs2_default.elf
[  2%] Built target bs2_default
[  3%] Generating bs2_default.bin
[  5%] Generating bs2_default_padded_checksummed.S
Scanning dependencies of target bs2_default_library
[  6%] Building ASM object pico-sdk/src/rp2350/boot_stage2/CMakeFiles/bs2_default_library.dir/bs2_default_padded_checksummed.S.o
[  6%] Built target bs2_default_library
make[4]: *** No rule to make target '/home/tonpa/depot/bitedits/pico-examples/build/universal/hello_universal/rp2350-riscv/all', needed by 'all'.  Stop.
make[3]: *** [Makefile:91: all] Error 2
make[2]: *** [universal/CMakeFiles/hello_universal_rp2350-riscv.dir/build.make:86: universal/pioasm/src/hello_universal_rp2350-riscv-stamp/hello_universal_rp2350-riscv-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:9399: universal/CMakeFiles/hello_universal_rp2350-riscv.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Files cmake_trace.log and make_trace.log are attached as gists:

ENV:

export PICO_SDK_PATH=/home/tonpa/depot/bitedits/pico-sdk
export PICO_RISCV_TOOLCHAIN_PATH=/opt/riscv/gcc14-rp2350-no-zcmp
export PICO_ARM_TOOLCHAIN_PATH=/usr
export PATH=$PATH:/opt/riscv/gcc14-rp2350-no-zcmp/bin
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.5 LTS"

Maxim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy