Skip to content

Commit

Permalink
ability to run riscv builds for rp2350 and partial action support
Browse files Browse the repository at this point in the history
  • Loading branch information
VynDragon committed Feb 10, 2025
1 parent 19ffba4 commit 2a12c21
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
matrix:
cmake_build_type: [Debug]
pico_board: ["pico_ice", "pico2_ice"]
include:
- pico_board: "pico_ice"
pico_platform: "rp2040"
- pico_board: "pico2_ice"
pico_platform: "rp2350"
- pico_board: "pico2_ice"
pico_platform: "rp2350-riscv"
example:
- rp2_blinky
- rp2_blinky_cplusplus
Expand Down Expand Up @@ -60,5 +67,5 @@ jobs:
cd examples/${{ matrix.example }}
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DPICO_BOARD=${{ matrix.pico_board }} ..
cmake -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DPICO_BOARD=${{ matrix.pico_board }} -DPICO_PLATFORM=${{ matrix.pico_platform }} ..
make -j4
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@
| [Discord](https://discord.gg/t2CzbAYeD2)

This is the SDK for building custom firmware for the RP2040 on the [pico-ice](https://pico-ice.tinyvision.ai/) board and RP2350 on [pico2-ice](https://pico2-ice.tinyvision.ai/) board.

### To quickly get started:
Provided you have the compilers setup.
For riscv, you may add `-DPICO_GCC_TRIPLE=riscv64-unknown-elf` to the cmake command if your 'riscv64' compiler supports rp2350/rv32.

- clone the repository
- run `git submodules update --init`
- got into the folder of the example you wish to try
- `mkdir build && cd build`
- `cmake -DPICO_BOARD=pico_ice ..` or `cmake -DPICO_BOARD=pico2_ice ..` or `cmake -DPICO_BOARD=pico2_ice -DPICO_PLATFORM=rp2350-riscv ..`
- `make -j8`
- Copy the generated uf2 to the board after setting it to flashing mode
4 changes: 3 additions & 1 deletion cmake/preinit_pico_ice_sdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ if (NOT DEFINED PICO_BOARD OR PICO_BOARD STREQUAL pico_ice)
target_compile_definitions(pico_ice_preinit_common INTERFACE PICO_ICE)
endif()
if (PICO_BOARD STREQUAL pico2_ice)
set(PICO_PLATFORM rp2350)
if (NOT DEFINED PICO_PLATFORM)
set(PICO_PLATFORM rp2350)
endif()
target_compile_definitions(pico_ice_preinit_common INTERFACE PICO2_ICE)
endif()
list(APPEND PICO_BOARD_HEADER_DIRS "${CMAKE_CURRENT_LIST_DIR}/../include/boards")
Expand Down

0 comments on commit 2a12c21

Please sign in to comment.