feat(example): Add RP2040-Zero example with EPD#187
feat(example): Add RP2040-Zero example with EPD#187Vaishnav-Sabari-Girish wants to merge 12 commits intoratatui:mainfrom
Conversation
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
…ibility - Fix typo in rp2040 clippy matrix entry: thumbv6em -> thumbv6m - Add mousefood-thumbv6m clippy matrix entry scoped to -p mousefood - Add args field to clippy matrix for per-entry cargo flags - Scope build-no-std thumbv6m target to -p mousefood kasuari v0.4.12 uses alloc::sync::Arc and AtomicUsize::fetch_add which are unavailable on thumbv6m-none-eabi without build-std. Building only the mousefood lib (which does not directly depend on kasuari) avoids the issue. The rp2040 example is unaffected as it uses build-std via its own .cargo/config.toml. Signed-off-by: Vaishnav Sabari Girish <[email protected]>
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
…pilation alloc::sync::Arc does not exist on thumbv6m-none-eabi regardless of build-std, because the module is gated behind target_has_atomic = "ptr" which Cortex-M0 does not have. No amount of -Zbuild-std flags can work around this at the workspace level. The rp2040 example already solves this correctly via its own .cargo/config.toml (build-std + panic_immediate_abort) combined with portable-atomic and rp2040-hal's critical-section-impl providing software atomics. Building from that directory is the only supported approach for thumbv6m. - Remove build-thumbv6m job (nightly + -Zbuild-std=core,alloc does not work) - Add build-rp2040 job building from examples/rp2040-1in54-epd-example - Add rust-src component to clippy stable toolchain for rp2040 clippy entry Signed-off-by: Vaishnav Sabari Girish <[email protected]>
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
I'm glad it worked @NustyFrozen , |
.github/workflows/ci.yml
Outdated
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo build --release --target ${{ matrix.target }} | ||
|
|
||
| # thumbv6m-none-eabi is validated by building the rp2040 example from its |
There was a problem hiding this comment.
Why do we have a separate job for this? Isn't this already built and validated by the matrix build above?
There was a problem hiding this comment.
thumbv6m-none-eabi is excluded from the matrix above for exactly the reason in the comment — it needs build-std which the matrix doesn't use. This job is the only place that target gets built and validated.
There was a problem hiding this comment.
I see.
This job can be renamed more generally though, for example build-std and we could make it a matrix, in case we include more targets here.
WDYT?
There was a problem hiding this comment.
It does make sense. Alright I shall look into that.
|
Hey @orhun I apologise not being able to update the PR. I have been swamped with college work lately and it looks like I might be busy for the next few days. Is it alright if I come back to this later ? |
|
Sure :) |
As requested, the code has been updated. Signed-off-by: Vaishnav Sabari Girish <[email protected]>
|
Hey @orhun , |
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
.github/workflows/ci.yml
Outdated
| - uses: Swatinem/rust-cache@v2 | ||
| - run: cargo build --release --target ${{ matrix.target }} | ||
|
|
||
| # thumbv6m-none-eabi is validated by building the rp2040 example from its |
There was a problem hiding this comment.
I see.
This job can be renamed more generally though, for example build-std and we could make it a matrix, in case we include more targets here.
WDYT?
- Move HEAP_SIZE and HEAP_MEM to global scope in RP2040 example - Generalize build-rp2040 CI job into a matrix-driven build-std job - Move thumbv6m build requirement documentation from CI to README.md Signed-off-by: Vaishnav Sabari Girish <[email protected]>
Signed-off-by: Vaishnav Sabari Girish <[email protected]>
|
Hey @orhun , |
Updated note about device path for clarity.
|
Done @orhun |
This PR adds the example using an RP2040-Zero microcontroller by Waveshare with a 1.54in E-Paper Display (EPD) by Waveshare. Closes #186