66 strategy :
77 fail-fast : false
88 matrix :
9- os : [ubuntu-latest, windows-latest, macos-14 ]
9+ os : [ubuntu-latest, windows-latest, macos-15 ]
1010 runs-on : ${{ matrix.os }}
1111 steps :
1212 - name : Checkout PicoRVD
13- uses : actions/checkout@v3
13+ uses : actions/checkout@v6
1414 with :
1515 path : PicoRVD
1616
17- - name : Checkout pico-sdk/1.5.1
18- uses : actions/checkout@v3
17+ - name : Checkout pico-sdk/2.2.0
18+ uses : actions/checkout@v6
1919 with :
2020 repository : raspberrypi/pico-sdk
21- ref : 1.5.1
21+ ref : 2.2.0
2222 path : pico-sdk
2323
2424 - name : Checkout pico-sdk submodules
@@ -29,21 +29,75 @@ jobs:
2929 if : ${{ matrix.os == 'windows-latest' }}
3030 working-directory : ${{github.workspace}}/PicoRVD
3131 run : choco install .github/workflows/choco_packages.config
32+
33+ - name : Download and setup libusb
34+ if : ${{ matrix.os == 'windows-latest' }}
35+ shell : bash
36+ run : |
37+ echo "Downloading libusb..."
38+ curl -L https://github.com/libusb/libusb/releases/download/v1.0.29/libusb-1.0.29.7z -o libusb.7z
39+ echo "Extracting libusb..."
40+ 7z x libusb.7z -oC:/libusb -y
41+ echo "Checking libusb structure..."
42+ ls -la C:/libusb/
43+
44+ echo "Cloning picotool..."
45+ git clone https://github.com/raspberrypi/picotool.git --branch 2.2.0 --depth 1 C:/picotool-src
46+
47+ echo "Building picotool with libusb support..."
48+ mkdir -p C:/picotool-src/build
49+ cd C:/picotool-src/build
50+
51+ # Find the actual libusb paths
52+ LIBUSB_LIB=$(find C:/libusb -name "libusb-1.0.dll.a" | head -n1)
53+ LIBUSB_DLL=$(find C:/libusb -name "libusb-1.0.dll" | head -n1)
54+ LIBUSB_INCLUDE=$(find C:/libusb -name "libusb.h" -exec dirname {} \; | head -n1)
55+
56+ echo "Found libusb library : $LIBUSB_LIB"
57+ echo "Found libusb DLL : $LIBUSB_DLL"
58+ echo "Found libusb include : $LIBUSB_INCLUDE"
59+
60+ # Configure picotool with found libusb paths
61+ cmake -G "Ninja" \
62+ -DCMAKE_BUILD_TYPE=Release \
63+ -DPICO_SDK_PATH="${{github.workspace}}/pico-sdk" \
64+ -DLIBUSB_LIBRARIES="$LIBUSB_LIB" \
65+ -DLIBUSB_INCLUDE_DIR="$LIBUSB_INCLUDE" \
66+ ..
67+
68+ # Build
69+ ninja
70+
71+ # Verify picotool was built
72+ if [ ! -f "picotool.exe" ]; then
73+ echo "ERROR : picotool.exe was not built!"
74+ exit 1
75+ fi
76+
77+ # Create deployment directory
78+ mkdir -p C:/picotool-bin
79+
80+ # Copy picotool executable and required DLL
81+ cp picotool.exe C:/picotool-bin/
82+ cp "$LIBUSB_DLL" C:/picotool-bin/
83+
84+ # Add to PATH for subsequent steps
85+ echo "C:/picotool-bin" >> $GITHUB_PATH
3286
3387 - name : Install dependencies (Linux)
3488 if : ${{ matrix.os == 'ubuntu-latest' }}
3589 run : sudo apt-get update && sudo apt-get install -y build-essential git cmake gcc-arm-none-eabi gcc-riscv64-unknown-elf
3690
3791 - name : Install dependencies (Mac)
38- if : ${{ matrix.os == 'macos-14 ' }}
92+ if : ${{ matrix.os == 'macos-15 ' }}
3993 run : |
4094 brew install cmake make
4195 brew install gcc-arm-embedded
4296 brew tap riscv-software-src/riscv
4397 brew install riscv-tools
4498
4599 - name : Build Project (CH32V003 Blinky)
46- if : ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14 ' }}
100+ if : ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-15 ' }}
47101 working-directory : ${{github.workspace}}/PicoRVD
48102 shell : bash
49103 run : |
65119
66120 - name : Upload UF2 File
67121 if : ${{ matrix.os == 'ubuntu-latest' }}
68- uses : actions/upload-artifact@v3
122+ uses : actions/upload-artifact@v6
69123 with :
70124 name : PicoRVD.uf2
71125 path : ${{github.workspace}}/PicoRVD/bin/picorvd.uf2
0 commit comments