Skip to content

Commit 390dd32

Browse files
committed
Update Workflows and Cmakelists.txt
1 parent 1d08f5a commit 390dd32

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

.github/workflows/build_sw.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,28 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828
- name: install build packages
29-
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
29+
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi g++ libstdc++-arm-none-eabi-newlib build-essential
3030

31-
- name: Get sdk and add PICO_SDK_PATH
31+
- name: Get SDK and add PICO_SDK_PATH
3232
run: cd /tmp && git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=/tmp/pico-sdk" >> $GITHUB_ENV
33+
34+
- name: Init submodules to get tinyUSB stack
35+
run: git submodule update --init
36+
37+
- name: Configure and run CMake Rev0.3
38+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
39+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
40+
run: cmake -B ${{github.workspace}}/Software/build-Rev-0_3 -S ${{github.workspace}}/Software -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=RP2040-Decoder-board-Rev-0_3
41+
42+
- name: Build Rev0.3
43+
# Build your program with the given configuration
44+
run: cmake --build ${{github.workspace}}/Software/build-Rev-0_3 --config ${{env.BUILD_TYPE}}
3345

34-
- name: Configure CMake
46+
- name: Configure and run CMake Rev1.0
3547
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3648
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
37-
run: cmake -B ${{github.workspace}}/Software/build -S ${{github.workspace}}/Software -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
49+
run: cmake -B ${{github.workspace}}/Software/build-Rev-1_0 -S ${{github.workspace}}/Software -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=RP2040-Decoder-board-Rev-1_0
3850

39-
- name: Build
51+
- name: Build Rev1.0
4052
# Build your program with the given configuration
41-
run: cmake --build ${{github.workspace}}/Software/build --config ${{env.BUILD_TYPE}}
42-
53+
run: cmake --build ${{github.workspace}}/Software/build-Rev-1_0 --config ${{env.BUILD_TYPE}}

.github/workflows/prerelease.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: install build packages
24-
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
24+
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi g++ libstdc++-arm-none-eabi-newlib build-essential
2525

2626
- name: Get sdk and add PICO_SDK_PATH
2727
run: cd /tmp && git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=/tmp/pico-sdk" >> $GITHUB_ENV
28+
29+
- name: Init submodules to get tinyUSB stack
30+
run: git submodule update --init
2831

2932
- name: Configure CMake
3033
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: install build packages
25-
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
25+
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi g++ libstdc++-arm-none-eabi-newlib build-essential
2626

2727
- name: Get sdk and add PICO_SDK_PATH
2828
run: cd /tmp && git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=/tmp/pico-sdk" >> $GITHUB_ENV
29-
29+
30+
- name: Init submodules to get tinyUSB stack
31+
run: git submodule update --init
32+
3033
- name: Configure CMake
3134
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3235
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type

Software/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ set(PICO_BOARD_HEADER_DIRS ${CMAKE_SOURCE_DIR})
2727
# Board type selection:
2828
#
2929
# Please select RP2040-Decoder-board-Rev-1_0 for Rev >= 1.0 or RP2040-Decoder-board-Rev-0_3 for Rev <= 0.3
30-
set(PICO_BOARD RP2040-Decoder-board-Rev-1_0)
30+
# running cmake with -DPICO_BOARD=RP2040-Decoder-board-Rev-X_Y explicitly from command line overrides this setting
31+
set(PICO_BOARD RP2040-Decoder-board-Rev-1_0 CACHE STRING "Board type")
3132

3233
# Pull in Raspberry Pi Pico SDK (must be before project)
3334
include(pico_sdk_import.cmake)

0 commit comments

Comments
 (0)