Skip to content

Commit f194302

Browse files
authored
Refactor Waveshare RP2040 Plus with flash size menu (#3016)
Replaces separate board entries for Waveshare RP2040 Plus 4MB and 16MB variants with a flash size menu.
1 parent 98419d8 commit f194302

File tree

6 files changed

+360
-664
lines changed

6 files changed

+360
-664
lines changed

boards.txt

Lines changed: 299 additions & 586 deletions
Large diffs are not rendered by default.

package/package_pico_index.template.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,7 @@
366366
"name": "Waveshare RP2040 PiZero"
367367
},
368368
{
369-
"name": "Waveshare RP2040 Plus 4MB"
370-
},
371-
{
372-
"name": "Waveshare RP2040 Plus 16MB"
369+
"name": "Waveshare RP2040 Plus"
373370
},
374371
{
375372
"name": "Waveshare RP2040 LCD 0.96"

tools/json/waveshare_rp2040_plus.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x2E8A",
7+
"usb_pid": "0x1020"
8+
}
9+
},
10+
"core": "earlephilhower",
11+
"cpu": "cortex-m0plus",
12+
"extra_flags": "-DARDUINO_WAVESHARE_RP2040_PLUS -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 ",
13+
"f_cpu": "133000000L",
14+
"hwids": [
15+
[
16+
"0x2E8A",
17+
"0x00C0"
18+
],
19+
[
20+
"0x2E8A",
21+
"0x1020"
22+
]
23+
],
24+
"mcu": "rp2040",
25+
"variant": "waveshare_rp2040_plus"
26+
},
27+
"debug": {
28+
"jlink_device": "RP2040_M0_0",
29+
"openocd_target": "rp2040.cfg",
30+
"svd_path": "rp2040.svd"
31+
},
32+
"frameworks": [
33+
"arduino",
34+
"picosdk"
35+
],
36+
"name": "RP2040 Plus",
37+
"upload": {
38+
"maximum_ram_size": 262144,
39+
"maximum_size": 4194304,
40+
"require_upload_port": true,
41+
"native_usb": true,
42+
"use_1200bps_touch": true,
43+
"wait_for_upload_port": false,
44+
"protocol": "picotool",
45+
"protocols": [
46+
"blackmagic",
47+
"cmsis-dap",
48+
"jlink",
49+
"raspberrypi-swd",
50+
"picotool",
51+
"picoprobe"
52+
]
53+
},
54+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
55+
"vendor": "Waveshare"
56+
}

tools/makeboards.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
350350
BuildCountry(name)
351351
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
352352
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
353+
elif name == "waveshare_rp2040_plus":
354+
BuildFlashMenu(name, chip, 4*1024*1024, [*smallfs, 1024*1024, 2*1024*1024, 3*1024*1024])
355+
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
353356
elif name == "waveshare_rp2350_plus":
354357
BuildFlashMenu(name, chip, 4*1024*1024, [*smallfs, 1024*1024, 2*1024*1024, 3*1024*1024])
355358
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
@@ -695,8 +698,7 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef
695698
MakeBoard("waveshare_rp2040_one", "rp2040", "Waveshare", "RP2040 One", "0x2e8a", "0x103a", 500, "WAVESHARE_RP2040_ONE", 4, 0, "boot2_w25q16jvxq_4_padded_checksum")
696699
MakeBoard("waveshare_rp2040_matrix", "rp2040", "Waveshare", "RP2040 Matrix", "0x2e8a", "0x103a", 500, "WAVESHARE_RP2040_MATRIX", 2, 0, "boot2_w25q16jvxq_4_padded_checksum")
697700
MakeBoard("waveshare_rp2040_pizero", "rp2040", "Waveshare", "RP2040 PiZero", "0x2e8a", "0x0003", 500, "WAVESHARE_RP2040_PIZERO", 16, 0, "boot2_w25q16jvxq_4_padded_checksum")
698-
MakeBoard("waveshare_rp2040_plus_4mb", "rp2040", "Waveshare", "RP2040 Plus 4MB", "0x2e8a", "0x1020", 500, "WAVESHARE_RP2040_PLUS", 4, 0, "boot2_w25q080_2_padded_checksum")
699-
MakeBoard("waveshare_rp2040_plus_16mb", "rp2040", "Waveshare", "RP2040 Plus 16MB", "0x2e8a", "0x1020", 500, "WAVESHARE_RP2040_PLUS", 16, 0, "boot2_w25q080_2_padded_checksum")
701+
MakeBoard("waveshare_rp2040_plus", "rp2040", "Waveshare", "RP2040 Plus", "0x2e8a", "0x1020", 500, "WAVESHARE_RP2040_PLUS", 4, 0, "boot2_w25q080_2_padded_checksum")
700702
MakeBoard("waveshare_rp2040_lcd_0_96", "rp2040", "Waveshare", "RP2040 LCD 0.96", "0x2e8a", "0x1021", 500, "WAVESHARE_RP2040_LCD_0_96", 2, 0, "boot2_w25q16jvxq_4_padded_checksum")
701703
MakeBoard("waveshare_rp2040_lcd_1_28", "rp2040", "Waveshare", "RP2040 LCD 1.28", "0x2e8a", "0x1039", 500, "WAVESHARE_RP2040_LCD_1_28", 2, 0, "boot2_w25q16jvxq_4_padded_checksum")
702704
MakeBoard("waveshare_rp2350_plus", "rp2350", "Waveshare", "RP2350 Plus", "0x2e8a", "0x10B1", 500, "WAVESHARE_RP2350_PLUS", 4, 0, "none")

variants/waveshare_rp2040_plus_4mb/pins_arduino.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)