-
Notifications
You must be signed in to change notification settings - Fork 4
Generic peripheral bridge for the interdevice link #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5b79da8
Generic peripheral bridge for the interdevice link
caveman99 0bf7988
Interdevice payload bounds: 256B I2C, full-length filenames, 64 bit f…
caveman99 b072049
Compute SD statistics in the background
caveman99 7d0e10e
Harden the link RX path and correlate responses
caveman99 0c2bfd4
Address review: stats retry on transient failure, Wire timeout, full-…
caveman99 598a30e
Move SD ownership to core1, answer ping, buffer NMEA downlink
caveman99 148e023
Link resync, ping/stats protocol update, scan cap, watchdog
caveman99 0797cf5
Regen protos for I2CResult UNSPECIFIED, drop core debug port define
caveman99 954da28
Nack unhandled requests, classify I2C errors with a probe
caveman99 cb0b9dd
Version handshake: answer ping with the protocol version we speak
caveman99 1ca576c
Regen protos: interdevice protocol version 2
caveman99 109ff26
Report a status per file operation, keep maintenance off the request …
caveman99 cf1c3b7
Do not report a card as absent while it is being mounted, bound the s…
caveman99 71a265e
Detect a pulled card on reads, list directories without reopening ent…
caveman99 deab3ec
Announce ourselves at boot, account free space instead of rescanning
caveman99 739887e
Suppress library warnings
caveman99 8e32a0b
wire up github
caveman99 836e07e
Regen protos: FileStatus back on the original tags
caveman99 f0eb58a
Regen protos: ping/pong carry the InterdeviceVersion enum
caveman99 5f308d0
Point the protobufs submodule at the merged upstream commit
caveman99 dc17e2c
Pin PlatformIO Core to a fixed commit in both workflows
caveman99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: build-${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Cache PlatformIO | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.platformio | ||
| ~/.cache/pip | ||
| key: pio-${{ runner.os }}-${{ hashFiles('platformio.ini') }} | ||
| restore-keys: pio-${{ runner.os }}- | ||
|
|
||
| - name: Install PlatformIO | ||
| run: pip install --upgrade https://github.com/pioarduino/platformio-core/archive/develop.tar.gz | ||
|
|
||
| - name: Build firmware | ||
| run: pio run -e seeed_indicator_rp2040 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| release: | ||
| types: [created, published] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: "Tag to build and attach the firmware to" | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.event.release.tag_name || github.ref_name || inputs.tag }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Resolve tag and version | ||
| id: version | ||
| env: | ||
| TAG: ${{ github.event.release.tag_name || inputs.tag || github.ref_name }} | ||
| run: | | ||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | ||
| echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ steps.version.outputs.tag }} | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Cache PlatformIO | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.platformio | ||
| ~/.cache/pip | ||
| key: pio-${{ runner.os }}-${{ hashFiles('platformio.ini') }} | ||
| restore-keys: pio-${{ runner.os }}- | ||
|
|
||
| - name: Install PlatformIO | ||
| run: pip install --upgrade https://github.com/pioarduino/platformio-core/archive/develop.tar.gz | ||
|
|
||
| - name: Build firmware | ||
| run: pio run -e seeed_indicator_rp2040 | ||
|
|
||
| - name: Bundle release archive | ||
| id: bundle | ||
| env: | ||
| VERSION: ${{ steps.version.outputs.version }} | ||
| run: | | ||
| name="indicator_rp2040-${VERSION}" | ||
| build=.pio/build/seeed_indicator_rp2040 | ||
| mkdir -p "dist/${name}" | ||
| cp "${build}/firmware.uf2" "dist/${name}/${name}.uf2" | ||
| cp "${build}/firmware.elf" "dist/${name}/${name}.elf" | ||
| cp "${build}/firmware.bin" "dist/${name}/${name}.bin" | ||
| cp LICENSE README.md "dist/${name}/" | ||
| (cd dist && zip -r "${name}.zip" "${name}") | ||
| echo "name=${name}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Upload build artifact | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: ${{ steps.bundle.outputs.name }} | ||
| path: dist/${{ steps.bundle.outputs.name }}.zip | ||
| if-no-files-found: error | ||
|
|
||
| - name: Publish release | ||
| uses: softprops/action-gh-release@v3 | ||
| with: | ||
| tag_name: ${{ steps.version.outputs.tag }} | ||
| # Only author the notes when this run is what creates the release. | ||
| # A release-triggered run must not overwrite notes that already exist. | ||
| generate_release_notes: ${{ github.event_name != 'release' }} | ||
| draft: false | ||
| fail_on_unmatched_files: true | ||
| files: | | ||
| dist/${{ steps.bundle.outputs.name }}.zip | ||
| .pio/build/seeed_indicator_rp2040/firmware.uf2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| enable=all | ||
| source-path=SCRIPTDIR | ||
| disable=SC2154 | ||
|
|
||
| # If you're having issues with shellcheck following source, disable the errors via: | ||
| # disable=SC1090 | ||
| # disable=SC1091 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "files.associations": { | ||
| "random": "cpp", | ||
| "array": "cpp", | ||
| "deque": "cpp", | ||
| "list": "cpp", | ||
| "string": "cpp", | ||
| "unordered_map": "cpp", | ||
| "vector": "cpp", | ||
| "string_view": "cpp", | ||
| "format": "cpp", | ||
| "initializer_list": "cpp", | ||
| "span": "cpp", | ||
| "text_encoding": "cpp", | ||
| "regex": "cpp", | ||
| "chrono": "cpp" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,37 @@ | ||
| ; PlatformIO Project Configuration File | ||
| ; | ||
| ; Build options: build flags, source filter | ||
| ; Upload options: custom upload port, speed and extra flags | ||
| ; Library options: dependencies, extra library storages | ||
| ; Advanced options: extra scripting | ||
| ; | ||
| ; Please visit documentation for the other options and examples | ||
| ; https://docs.platformio.org/page/projectconf.html | ||
|
|
||
| [env:seeed_indicator_rp2040] | ||
| platform = https://github.com/maxgerhardt/platform-raspberrypi.git#c7502925e3b08af70e9f924d54ab9d00a7e64781 | ||
| platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#4.4.4 | ||
| framework = arduino | ||
|
|
||
| board = seeed_indicator_rp2040 | ||
| board_build.core = earlephilhower | ||
| board_build.filesystem_size = 0.5m | ||
|
|
||
| build_flags = | ||
| -Wno-missing-field-initializers | ||
| -Wno-format | ||
| -Isrc | ||
| -Isrc/generated | ||
| -Wl,-Map,.pio/build/output.map | ||
| -Os | ||
| -Wno-unused-variable | ||
| -Wcast-align | ||
| -D__PLAT_RP2040__ | ||
|
|
||
| lib_deps = | ||
| sensirion/Sensirion Core@0.7.1 | ||
| sensirion/Sensirion I2C SCD4x@1.0.0 | ||
| sensirion/Sensirion I2C SGP40@0.1.0 | ||
| sensirion/Sensirion Gas Index Algorithm@3.2.3 | ||
| nanopb/Nanopb@0.4.91 | ||
| https://github.com/Seeed-Studio/Seeed_Arduino_AHT20.git#v1.0.1 | ||
|
|
||
|
|
||
| monitor_speed = 115200 | ||
| ; PlatformIO Project Configuration File | ||
| ; | ||
| ; Build options: build flags, source filter | ||
| ; Upload options: custom upload port, speed and extra flags | ||
| ; Library options: dependencies, extra library storages | ||
| ; Advanced options: extra scripting | ||
| ; | ||
| ; Please visit documentation for the other options and examples | ||
| ; https://docs.platformio.org/page/projectconf.html | ||
|
|
||
| [env:seeed_indicator_rp2040] | ||
| platform = https://github.com/maxgerhardt/platform-raspberrypi.git#aa70b802be8851668053d4f09734e4089fe41932 | ||
| framework = arduino | ||
|
|
||
| board = seeed_indicator_rp2040 | ||
| board_build.core = earlephilhower | ||
|
|
||
| extra_scripts = pre:suppress_lib_warnings.py | ||
|
|
||
| build_flags = | ||
| -Wno-missing-field-initializers | ||
| -Wno-format | ||
| -Isrc | ||
| -Wl,-Map,.pio/build/output.map | ||
| -Os | ||
| -Wno-unused-variable | ||
| -Wcast-align | ||
| -D__PLAT_RP2040__ | ||
| -DHW_SPI1_DEVICE | ||
|
|
||
| lib_deps = | ||
| # renovate: datasource=custom.pio depName=Nanopb packageName=nanopb/library/Nanopb | ||
| nanopb/Nanopb@0.4.91 | ||
|
|
||
| monitor_speed = 115200 | ||
|
|
||
| debug_tool = cmsis-dap |
Submodule protobufs
updated
72 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #include "buzzer.h" | ||
|
|
||
| uint32_t buzz_off = 0; | ||
|
|
||
| void beep_init(void) { pinMode(BUZZER_GPIO, OUTPUT); } | ||
| void beep_off(void) { digitalWrite(BUZZER_GPIO, LOW); } | ||
| void beep_on(uint32_t duration) { | ||
| analogWrite(BUZZER_GPIO, 127); | ||
| buzz_off = millis() + duration; | ||
| if (buzz_off == 0) // 0 means inactive, don't let the beep stick on | ||
| buzz_off = 1; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #pragma once | ||
|
|
||
| #ifndef BUZZER_H | ||
| #define BUZZER_H | ||
|
|
||
| #define BUZZER_GPIO 19 | ||
|
|
||
| #include <Arduino.h> | ||
|
|
||
| extern uint32_t buzz_off; | ||
|
|
||
| void beep_init(void); | ||
| void beep_off(void); | ||
| void beep_on(uint32_t duration); | ||
|
|
||
| #endif // BUZZER_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: meshtastic/indicator_rp2040
Length of output: 2006
🏁 Script executed:
Repository: meshtastic/indicator_rp2040
Length of output: 1977
🏁 Script executed:
Repository: meshtastic/indicator_rp2040
Length of output: 1977
🌐 Web query:
site:github.com meshtastic/indicator_rp2040 .github/workflows/release.yml .github/workflows/build.yml "pioarduino/platformio-core" "develop.tar.gz"💡 Result:
The items referenced in your query are associated with the development, build automation, and infrastructure of the Meshtastic project and the PlatformIO ecosystem. meshtastic/indicator_rp2040 is a specific repository within the Meshtastic GitHub organization, typically used for firmware or indicator software related to RP2040-based hardware [1][2]..github/workflows/release.yml and.github/workflows/build.yml are standard GitHub Actions workflow configuration files used in repositories (such as the main Meshtastic firmware repository) to automate testing, compilation (build), and release processes [3][4][5]. These files define the CI/CD pipeline, including steps for building firmware for various architectures like RP2040, ESP32, and nRF52 [3][4]. pioarduino/platformio-core is a community-maintained fork of the standard PlatformIO Core repository [6]. PlatformIO Core itself is the command-line interface and underlying build system used to manage dependencies, compile code, and flash firmware for embedded projects like Meshtastic [7][8]. The pioarduino fork is sometimes utilized in specific build environments or to support custom platform requirements [9]. develop.tar.gz is a common naming convention for a source code archive generated from the develop branch of a software repository. In the context of Meshtastic, firmware development is primarily tracked in the develop branch, and build systems or automated scripts may generate or reference such archives during development, testing, or release packaging [10][11][12][13].
Citations:
Pin PlatformIO Core to a commit SHA.
.github/workflows/release.ymland.github/workflows/build.ymlboth install fromdevelop.tar.gz, which can drift over time and make CI/release artifacts diverge. Use the same reviewed commit SHA in both workflows.📍 Affects 2 files
.github/workflows/release.yml#L57-L57(this comment).github/workflows/build.yml#L42-L42🤖 Prompt for AI Agents