Skip to content

build rp2350 boards #280

build rp2350 boards

build rp2350 boards #280

Workflow file for this run

name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
BUILD_TYPE: Release
BUILD_TARGET: all
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
board: [ rp2040, rp2350 ]
steps:
- uses: actions/checkout@v4
- name: Linux setup
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update && sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
echo "PICO_SDK_FETCH_FROM_GIT=TRUE" >> "$GITHUB_ENV"
- name: MacOS setup
if: ${{ matrix.os == 'macos-latest'}}
run: |
brew update && brew install --cask gcc-arm-embedded
echo "PICO_SDK_FETCH_FROM_GIT=TRUE" >> "$GITHUB_ENV"
- name: Windows setup
if: ${{ matrix.os == 'windows-latest'}}
run: |
choco install gcc-arm-embedded
git clone https://github.com/raspberrypi/pico-sdk.git -b master --single-branch "$Env:TEMP\pico-sdk"
echo "PICO_SDK_PATH=$Env:TEMP\pico-sdk" >> "$env:GITHUB_ENV"
cd "$Env:TEMP\pico-sdk"
git submodule init
git submodule update
- name: Configure CMake Linux & MacOS
if: ${{ matrix.os != 'windows-latest'}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBP_PICO_PLATFORM=${{matrix.board}}
- name: Configure CMake Windows
if: ${{ matrix.os == 'windows-latest'}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBP_PICO_PLATFORM=${{matrix.board}} -DCMAKE_C_COMPILER=C:\ProgramData\chocolatey\bin\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER=C:\ProgramData\chocolatey\bin\arm-none-eabi-g++.exe -G "Unix Makefiles"
- name: Build
run: cmake --build ${{github.workspace}}/build --target ${{env.BUILD_TARGET}}
- name: Save Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.os }}
path: |
${{github.workspace}}/build/src/bus_pirate*.bin
${{github.workspace}}/build/src/bus_pirate*.dis
${{github.workspace}}/build/src/bus_pirate*.elf
${{github.workspace}}/build/src/bus_pirate*.elf.map
${{github.workspace}}/build/src/bus_pirate*.uf2
retention-days: 7
if-no-files-found: error