Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@ jobs:
run: |
cp ./build2/Telemetrix4RpiPico.uf2 ./
cp ./build2/Telemetrix4RpiPico.elf ./
# - name: install nodejs
# run: |
# apt update
# apt install curl unzip -y
# curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
# chmod +x nodesource_setup.sh
# ./nodesource_setup.sh
# apt-get install -y nodejs
# node -v
cp ./build_pico2/Telemetrix4RpiPico_merged.uf2 ./Telemetrix4RpiPico_merged.uf2
cp ./build_pico2/Telemetrix4RpiPico.elf ./Telemetrix4RpiPico_pico2.elf
cp ./build_pico2/Telemetrix4RpiPico.uf2 ./Telemetrix4RpiPico_pico2.uf2
- name: Put environment variable into the env context
run: echo "app_name=$APP_NAME" >> $GITHUB_ENV
- name: Archive production artifacts
Expand All @@ -47,13 +41,19 @@ jobs:
path: |
Telemetrix4RpiPico.uf2
Telemetrix4RpiPico.elf
Telemetrix4RpiPico_merged.uf2
Telemetrix4RpiPico_pico2.elf
Telemetrix4RpiPico_pico2.uf2
- name: Push to release
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Telemetrix4RpiPico.uf2
Telemetrix4RpiPico.elf
Telemetrix4RpiPico_merged.uf2
Telemetrix4RpiPico_pico2.elf
Telemetrix4RpiPico_pico2.uf2
generate_release_notes: true
- name: Check if mirte-sd-image-tools has release with same tag
id: check_release
Expand Down Expand Up @@ -87,6 +87,9 @@ jobs:
files: |
Telemetrix4RpiPico.uf2
Telemetrix4RpiPico.elf
# Telemetrix4RpiPico_merged.uf2
# Telemetrix4RpiPico_pico2.elf
# Telemetrix4RpiPico_pico2.uf2
generate_release_notes: false
tag_name: ${{ github.ref_name }}
token: ${{ secrets.RELEASE_TOKEN }} # needs contents permission on mirte-sd-image-tools
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ build/
test/
build2/
build_rel/
build_pico2/
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ target_link_libraries(
pico_ssd1306
Adafruit_BNO055)

set(SKIP_BOOTLOADER_ENTRY_PIN 1)
add_subdirectory(rp2040-serial-bootloader)
# pico_set_linker_script(Telemetrix4RpiPico
# ${CMAKE_CURRENT_SOURCE_DIR}/blink_noboot2.ld)

bootloader_build_combined(Telemetrix4RpiPico)
# if PICO_BOARD starts with "pico" and not "pico2", then we can add the serial
# bootloader
if(PICO_BOARD MATCHES "^pico" AND NOT PICO_BOARD MATCHES "^pico2")
# this bootloader only works for pico and pico_w, not for pico2, so we only
# add it for those boards
set(SKIP_BOOTLOADER_ENTRY_PIN 1)
add_subdirectory(rp2040-serial-bootloader)
bootloader_build_combined(Telemetrix4RpiPico)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_custom_target(
Expand Down
13 changes: 10 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
# de8ae5a
set -e
set -ex
git config --global --add safe.directory /__w/Telemetrix4RpiPico/Telemetrix4RpiPico # fix for cmake not reading git stuff
mkdir build2/
mkdir -p build2/
ls
cd build2
# Sometimes the debug build reports more errors than Release
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_BUILD_TYPE=Release -DPICO_BOARD=pico ..
make -j
cd ..
# rm -rf build2
Expand All @@ -17,3 +17,10 @@ cd ..
# make
sha256sum * || true
sha256sum build/* || true

mkdir -p build_pico2/
cd build_pico2/
cmake -DCMAKE_BUILD_TYPE=Release -DPICO_BOARD=pico2 ..
make -j3
cd ..
cat build2/Telemetrix4RpiPico.uf2 build_pico2/Telemetrix4RpiPico.uf2 > build_pico2/Telemetrix4RpiPico_merged.uf2