Skip to content

Instantly share code, notes, and snippets.

@KunYi
Last active November 13, 2024 06:49
Show Gist options
  • Save KunYi/7a433522ac0998accc883263e322059b to your computer and use it in GitHub Desktop.
Save KunYi/7a433522ac0998accc883263e322059b to your computer and use it in GitHub Desktop.
build pico-examples with pico2 arm mode
kunyi@kunyi-TP-P53:/tmp/pico-examples$ mkdir build
kunyi@kunyi-TP-P53:/tmp/pico-examples$ cd build/
kunyi@kunyi-TP-P53:/tmp/pico-examples/build$ cmake .. -DPICO_PLATFORM=rp2350 -DPICO_BOARD=pico2 -DPICO_SDK_PATH=/tmp/pico-sdk -DPICO_EXAMPLES_PATH=/tmp/pico-examples 
PICO_SDK_PATH is /tmp/pico-sdk
Target board (PICO_BOARD) is 'pico2'.
Using board configuration from /tmp/pico-sdk/src/boards/include/boards/pico2.h
Pico Platform (PICO_PLATFORM) is 'rp2350-arm-s'.
Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m33_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m33_gcc'
-- Defaulting build type to 'Release' since not specified.
Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-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: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
CMake Warning at /tmp/pico-sdk/tools/Findpicotool.cmake:28 (message):
  No installed picotool with version 2.0.0 found - building from source

  It is recommended to build and install picotool separately, or to set
  PICOTOOL_FETCH_FROM_GIT_PATH to a common directory for all your SDK
  projects
Call Stack (most recent call first):
  /tmp/pico-sdk/tools/CMakeLists.txt:138 (find_package)
  /tmp/pico-sdk/src/cmake/on_device.cmake:33 (pico_init_picotool)
  /tmp/pico-sdk/src/rp2350/boot_stage2/CMakeLists.txt:57 (pico_add_dis_output)
  /tmp/pico-sdk/src/rp2350/boot_stage2/CMakeLists.txt:100 (pico_define_boot_stage2)


Downloading Picotool
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
TinyUSB available at /tmp/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /tmp/pico-sdk/lib/btstack
cyw43-driver available at /tmp/pico-sdk/lib/cyw43-driver
lwIP available at /tmp/pico-sdk/lib/lwip
mbedtls available at /tmp/pico-sdk/lib/mbedtls
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 universal examples as PICO_RISCV_TOOLCHAIN_PATH and PICO_ARM_TOOLCHAIN_PATH are not defined
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
CMake Warning:
  Manually-specified variables were not used by the project:

    PICO_ARM_TOOLCHAIN


-- Build files have been written to: /tmp/pico-examples/build
kunyi@kunyi-TP-P53:/tmp/pico-examples/build$ make -j12
[  0%] Creating directories for 'pioasmBuild'
[  0%] Generating enc_bootloader.ld
[  0%] Generating hello_serial_enc.ld
[  0%] Generating generated/sample.txt.inc
[  0%] Built target picotoolForceReconfigure
[  0%] Built target enc_bootloader_ld
[  0%] Built target sample.txt.inc
[  0%] Built target hello_serial_enc_ld
[  0%] No download step for 'pioasmBuild'
[  0%] Creating directories for 'picotoolBuild'
[  0%] No update step for 'pioasmBuild'
[  0%] No download step for 'picotoolBuild'
[  0%] No patch step for 'pioasmBuild'
[  0%] No update step for 'picotoolBuild'
[  0%] Performing configure step for 'pioasmBuild'
[  0%] No patch step for 'picotoolBuild'
Not searching for unused variables given on the command line.
loading initial cache file /tmp/pico-examples/build/pico-sdk/src/rp2_common/pico_cyw43_driver/pioasm/tmp/pioasmBuild-cache-Release.cmake
[  0%] Performing configure step for 'picotoolBuild'
Not searching for unused variables given on the command line.
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pico-examples/build/pioasm
[  0%] Performing build step for 'pioasmBuild'
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
.//tmp/pico-examples/build/_deps/picotool/
-- Using the single-header code from /tmp/pico-examples/build/_deps/picotool-src/lib/nlohmann_json/single_include/
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
libUSB is not found - no USB support will be built
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pico-examples/build/_deps/picotool-build
[  0%] Performing build step for 'picotoolBuild'
[  2%] Built target errors
[  3%] Built target elf
[ 70%] Built target mbedcrypto
[ 72%] Built target elf2uf2
[ 80%] Built target mbedx509
[100%] Built target pioasm
[  0%] Performing install step for 'pioasmBuild'
[100%] Built target pioasm
Install the project...
-- Install configuration: "Release"
[  0%] Completed 'pioasmBuild'
[  0%] Built target pioasmBuild
[  0%] Generating resistor_dac.pio.h
[  0%] Generating pio_serialiser.pio.h
[  0%] Generating apa102.pio.h
[  0%] Generating differential_manchester.pio.h
[  0%] Generating clocked_input.pio.h
[  0%] Generating hello.pio.h
[  0%] Generating hub75.pio.h
[  0%] Generating addition.pio.h
[  0%] Built target adc_dma_capture_resistor_dac_pio_h
[  0%] Built target pio_apa102_apa102_pio_h
[  0%] Built target pio_differential_manchester_differential_manchester_pio_h
[  0%] Built target pio_hub75_hub75_pio_h
[  0%] Built target pio_addition_addition_pio_h
[  0%] Built target dma_channel_irq_pio_serialiser_pio_h
[  0%] Built target pio_clocked_input_clocked_input_pio_h
[  0%] Built target hello_pio_hello_pio_h
[  0%] Generating nec_carrier_control.pio.h
[  0%] Generating i2c.pio.h
[  0%] Generating nec_carrier_burst.pio.h
[  0%] Generating nec_receive.pio.h
[  0%] Generating blink.pio.h
[  0%] Generating manchester_encoding.pio.h
[  0%] Generating onewire_library.pio.h
[  1%] Generating pwm.pio.h
[  1%] Built target nec_receive_library_nec_receive_pio_h
[  1%] Built target nec_transmit_library_nec_carrier_control_pio_h
[  1%] Built target pio_manchester_encoding_manchester_encoding_pio_h
[  1%] Built target nec_transmit_library_nec_carrier_burst_pio_h
[  1%] Built target onewire_library_onewire_library_pio_h
[  1%] Built target pio_blink_blink_pio_h
[  1%] Built target pio_pwm_pwm_pio_h
[  1%] Built target pio_i2c_bus_scan_i2c_pio_h
[  1%] Generating quadrature_encoder_substep.pio.h
[  1%] Generating spi.pio.h
[  1%] Generating quadrature_encoder.pio.h
[  1%] Generating spi.pio.h
[  1%] Built target pio_squarewave_datasheet
[  1%] Generating squarewave_wrap.pio.h
[  1%] Generating squarewave.pio.h
[  1%] Generating squarewave_fast.pio.h
[  1%] Built target pio_quadrature_encoder_quadrature_encoder_pio_h
[  1%] Built target pio_spi_loopback_spi_pio_h
[  1%] Built target pio_quadrature_encoder_substep_quadrature_encoder_substep_pio_h
[  1%] Built target pio_spi_flash_spi_pio_h
[  1%] Built target pio_squarewave_squarewave_wrap_pio_h
[  1%] Built target pio_squarewave_squarewave_pio_h
[  1%] Built target pio_squarewave_div_sync_squarewave_pio_h
[  1%] Built target pio_squarewave_squarewave_fast_pio_h
[  1%] Generating st7789_lcd.pio.h
[  1%] Generating uart_rx.pio.h
[  1%] Generating uart_rx.pio.h
[  1%] Generating uart_tx.pio.h
[  1%] Built target pio_ws2812_ws2812_pio_h
[  2%] Built target pio_ws2812_datasheet
[  2%] Built target pio_ws2812_parallel_ws2812_pio_h
[  2%] Built target pio_st7789_lcd_st7789_lcd_pio_h
[  2%] Built target pio_uart_rx_intr_uart_rx_pio_h
[  2%] Built target pio_uart_rx_uart_rx_pio_h
[  2%] Built target pio_uart_tx_uart_tx_pio_h
[ 90%] Built target mbedtls
[ 93%] Built target bintool
[100%] Built target picotool
[  3%] Performing install step for 'picotoolBuild'
[  2%] Built target errors
[  3%] Built target elf
[  5%] Built target elf2uf2
[ 72%] Built target mbedcrypto
[ 80%] Built target mbedx509
[ 90%] Built target mbedtls
[ 93%] Built target bintool
[100%] Built target picotool
Install the project...
-- Install configuration: "Release"
[  3%] Performing test step for 'picotoolBuild'
picotool v2.0.0 (Linux, GNU-11.4.0, Release)
[  3%] Completed 'picotoolBuild'
[  3%] Built target picotoolBuild
[  3%] Building ASM object pico-sdk/src/rp2350/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/hello_serial.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/enc_bootloader.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/rp2350/pico_platform/platform.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2350/pico_platform/platform.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/nuke.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/pico_platform_panic/panic.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[  3%] Building ASM object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/aes.S.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[  3%] Linking ASM executable bs2_default.elf
[  3%] Building C object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/tmp/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[  3%] Built target bs2_default
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/common/hardware_claim/claim.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/rp2_common/pico_platform_panic/panic.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/tmp/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/hardware_sync_spin_lock/sync_spin_lock.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/common/hardware_claim/claim.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/tmp/pico-sdk/src/rp2350/pico_platform/platform.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/enc_bootloader.dir/tmp/pico-sdk/src/rp2_common/pico_platform_panic/panic.c.obj
[  3%] Building C object bootloaders/encrypted/CMakeFiles/hello_serial_enc.dir/tmp/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj
[  3%] Building C object flash/nuke/CMakeFiles/flash_nuke.dir/tmp/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment