feat: add Waveshare RP2040-LoRa board support
New RP2040 board family in board selector, homepage grid, and UF2 download flow (RPI-RP2 drive name, correct probe-rs chip). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
5 files changed
+38
-4
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
let { selected, onselect }: Props = $props();
|
let { selected, onselect }: Props = $props();
|
||||||
|
|
||||||
const espBoards = boards.filter((b) => b.family === "esp32s3");
|
const espBoards = boards.filter((b) => b.family === "esp32s3");
|
||||||
|
const rpBoards = boards.filter((b) => b.family === "rp2040");
|
||||||
const nrfBoards = boards.filter((b) => b.family === "nrf52840");
|
const nrfBoards = boards.filter((b) => b.family === "nrf52840");
|
||||||
|
|
||||||
function badgeText(board: BoardDef): string {
|
function badgeText(board: BoardDef): string {
|
||||||
@@ -55,6 +56,23 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p class="text-xs text-text-dim mb-2 font-mono">RP2040</p>
|
||||||
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 mb-4">
|
||||||
|
{#each rpBoards as board}
|
||||||
|
<button
|
||||||
|
class="text-left bg-bg-card border p-4 rounded transition-all cursor-pointer
|
||||||
|
{selected?.id === board.id
|
||||||
|
? 'border-accent shadow-[0_0_12px_oklch(from_var(--color-accent)_l_c_h_/_0.15)]'
|
||||||
|
: 'border-border hover:border-border-bright'}"
|
||||||
|
onclick={() => onselect(board)}
|
||||||
|
>
|
||||||
|
<div class="font-mono font-medium text-text text-sm">{board.name}</div>
|
||||||
|
<div class="text-xs text-text-muted mt-1">{board.mcu} · {board.radio}</div>
|
||||||
|
<div class="text-xs {badgeColor(board)} mt-2 font-mono">{badgeText(board)}</div>
|
||||||
|
</button>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="text-xs text-text-dim mb-2 font-mono">nRF52840</p>
|
<p class="text-xs text-text-dim mb-2 font-mono">nRF52840</p>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||||
{#each nrfBoards as board}
|
{#each nrfBoards as board}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
? "RAK4631"
|
? "RAK4631"
|
||||||
: board.id === "wio_tracker_l1"
|
: board.id === "wio_tracker_l1"
|
||||||
? "WIO-L1"
|
? "WIO-L1"
|
||||||
: "UF2BOOT",
|
: board.id === "waveshare_rp2040_lora"
|
||||||
|
? "RPI-RP2"
|
||||||
|
: "UF2BOOT",
|
||||||
);
|
);
|
||||||
|
|
||||||
function handleDownload() {
|
function handleDownload() {
|
||||||
@@ -99,7 +101,7 @@
|
|||||||
If you have a debug probe (J-Link, DAPLink), you can flash the .elf directly:
|
If you have a debug probe (J-Link, DAPLink), you can flash the .elf directly:
|
||||||
</p>
|
</p>
|
||||||
<pre class="font-mono text-xs text-accent bg-bg-elevated p-3 rounded overflow-x-auto">cargo install probe-rs-tools
|
<pre class="font-mono text-xs text-accent bg-bg-elevated p-3 rounded overflow-x-auto">cargo install probe-rs-tools
|
||||||
probe-rs run --chip nRF52840_xxAA donglora-{board.id}-v{release.version}.elf</pre>
|
probe-rs run --chip {board.family === "rp2040" ? "rp2040" : "nRF52840_xxAA"} donglora-{board.id}-v{release.version}.elf</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,6 +40,15 @@ export const boards: BoardDef[] = [
|
|||||||
flashMethod: "uf2",
|
flashMethod: "uf2",
|
||||||
assetPattern: "donglora-rak_wisblock_4631-v{version}.uf2",
|
assetPattern: "donglora-rak_wisblock_4631-v{version}.uf2",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "waveshare_rp2040_lora",
|
||||||
|
name: "Waveshare RP2040-LoRa",
|
||||||
|
mcu: "RP2040",
|
||||||
|
radio: "SX1262",
|
||||||
|
family: "rp2040",
|
||||||
|
flashMethod: "uf2",
|
||||||
|
assetPattern: "donglora-waveshare_rp2040_lora-v{version}.uf2",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "wio_tracker_l1",
|
id: "wio_tracker_l1",
|
||||||
name: "Wio Tracker L1",
|
name: "Wio Tracker L1",
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
export type BoardFamily = "esp32s3" | "nrf52840";
|
export type BoardFamily = "esp32s3" | "nrf52840" | "rp2040";
|
||||||
export type FlashMethod = "web-serial" | "uf2" | "download-only";
|
export type FlashMethod = "web-serial" | "uf2" | "download-only";
|
||||||
|
|
||||||
export interface BoardDef {
|
export interface BoardDef {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ your code ──► client lib ──┘</pre>
|
|||||||
<!-- Supported Boards -->
|
<!-- Supported Boards -->
|
||||||
<section class="py-12">
|
<section class="py-12">
|
||||||
<h2 class="font-mono text-2xl font-bold mb-6 text-text">Supported Boards</h2>
|
<h2 class="font-mono text-2xl font-bold mb-6 text-text">Supported Boards</h2>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-4">
|
||||||
<div class="bg-bg-card border border-border p-5 rounded">
|
<div class="bg-bg-card border border-border p-5 rounded">
|
||||||
<h3 class="font-mono font-medium text-text mb-2">Heltec V3</h3>
|
<h3 class="font-mono font-medium text-text mb-2">Heltec V3</h3>
|
||||||
<p class="text-sm text-text-muted">ESP32-S3 · SX1262</p>
|
<p class="text-sm text-text-muted">ESP32-S3 · SX1262</p>
|
||||||
@@ -239,6 +239,11 @@ your code ──► client lib ──┘</pre>
|
|||||||
<p class="text-sm text-text-muted">nRF52840 · SX1262</p>
|
<p class="text-sm text-text-muted">nRF52840 · SX1262</p>
|
||||||
<p class="text-xs text-info mt-2 font-mono">UF2 Download</p>
|
<p class="text-xs text-info mt-2 font-mono">UF2 Download</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="bg-bg-card border border-border p-5 rounded">
|
||||||
|
<h3 class="font-mono font-medium text-text mb-2">Waveshare RP2040-LoRa</h3>
|
||||||
|
<p class="text-sm text-text-muted">RP2040 · SX1262</p>
|
||||||
|
<p class="text-xs text-info mt-2 font-mono">UF2 Download</p>
|
||||||
|
</div>
|
||||||
<div class="bg-bg-card border border-border p-5 rounded">
|
<div class="bg-bg-card border border-border p-5 rounded">
|
||||||
<h3 class="font-mono font-medium text-text mb-2">Wio Tracker L1</h3>
|
<h3 class="font-mono font-medium text-text mb-2">Wio Tracker L1</h3>
|
||||||
<p class="text-sm text-text-muted">nRF52840 · SX1262</p>
|
<p class="text-sm text-text-muted">nRF52840 · SX1262</p>
|
||||||
|
|||||||
Reference in new issue
Block a user