Skip to content

Commit 2782dd1

Browse files
authored
Add Waveshare RP2040 Zero (#980)
1 parent 852219c commit 2782dd1

File tree

6 files changed

+644
-1
lines changed

6 files changed

+644
-1
lines changed

boards.txt

Lines changed: 494 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Padded and checksummed version of: generated\Winbond\W25Q16JVxQ\boot2.bin
2+
3+
.cpu cortex-m0plus
4+
.thumb
5+
6+
.section .boot2, "ax"
7+
8+
.byte 0xf7, 0xb5, 0x73, 0x46, 0x21, 0x22, 0x02, 0x26, 0x01, 0x93, 0x29, 0x4b, 0xc0, 0x24, 0x5a, 0x60
9+
.byte 0x9a, 0x68, 0x00, 0x27, 0xb2, 0x43, 0xda, 0x60, 0x9a, 0x60, 0x1a, 0x61, 0x5a, 0x61, 0x04, 0x23
10+
.byte 0x01, 0x25, 0x64, 0x05, 0xa7, 0x60, 0x63, 0x61, 0x22, 0x4b, 0x30, 0x00, 0x1d, 0x60, 0xe0, 0x23
11+
.byte 0xdb, 0x02, 0x23, 0x60, 0x35, 0x23, 0xa5, 0x60, 0x23, 0x66, 0x23, 0x66, 0x00, 0xf0, 0x4a, 0xf8
12+
.byte 0xc0, 0xb2, 0xb0, 0x42, 0x12, 0xd0, 0x06, 0x23, 0x28, 0x00, 0x23, 0x66, 0x00, 0xf0, 0x42, 0xf8
13+
.byte 0x25, 0x66, 0x03, 0x20, 0x27, 0x66, 0x26, 0x66, 0x00, 0xf0, 0x3c, 0xf8, 0x03, 0x36, 0x26, 0x66
14+
.byte 0x02, 0x20, 0x26, 0x66, 0x00, 0xf0, 0x36, 0xf8, 0x28, 0x42, 0xf8, 0xd1, 0x00, 0x25, 0x12, 0x4b
15+
.byte 0xa5, 0x60, 0x12, 0x4f, 0x23, 0x60, 0x12, 0x4b, 0x65, 0x60, 0x01, 0x26, 0x3b, 0x60, 0xeb, 0x23
16+
.byte 0xa6, 0x60, 0x23, 0x66, 0x4b, 0x3b, 0x23, 0x66, 0x02, 0x20, 0x00, 0xf0, 0x23, 0xf8, 0x0d, 0x4b
17+
.byte 0xa5, 0x60, 0x3b, 0x60, 0xa6, 0x60, 0x01, 0x9b, 0xab, 0x42, 0x08, 0xd1, 0x0a, 0x4b, 0x0b, 0x4a
18+
.byte 0x13, 0x60, 0x1b, 0x68, 0x83, 0xf3, 0x08, 0x88, 0x09, 0x4b, 0x1b, 0x68, 0x18, 0x47, 0xf7, 0xbd
19+
.byte 0x00, 0x00, 0x02, 0x40, 0xf0, 0x00, 0x00, 0x18, 0x00, 0x03, 0x5f, 0x00, 0xf4, 0x00, 0x00, 0x18
20+
.byte 0x21, 0x22, 0x00, 0x00, 0x22, 0x20, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x10, 0x08, 0xed, 0x00, 0xe0
21+
.byte 0x04, 0x01, 0x00, 0x10, 0xc0, 0x22, 0x03, 0x00, 0x04, 0x21, 0x52, 0x05, 0x90, 0x6a, 0x08, 0x42
22+
.byte 0xfc, 0xd0, 0x01, 0x21, 0x90, 0x6a, 0x08, 0x42, 0xfc, 0xd1, 0x01, 0x3b, 0xdb, 0xb2, 0x10, 0x6e
23+
.byte 0x00, 0x2b, 0xfa, 0xd1, 0x70, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xa0, 0xf0, 0x2f

package/package_pico_index.template.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
{
126126
"name": "Seeed XIAO RP2040"
127127
},
128+
{
129+
"name": "Waveshare RP2040 Zero"
130+
},
128131
{
129132
"name": "WIZnet W5100S-EVB-Pico"
130133
},
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q16jvxq_4_padded_checksum.S",
6+
"usb_vid": "0x2E8A",
7+
"usb_pid": "0x0003"
8+
}
9+
},
10+
"core": "earlephilhower",
11+
"cpu": "cortex-m0plus",
12+
"extra_flags": "-D ARDUINO_WAVESHARE_RP2040_ZERO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
13+
"f_cpu": "133000000L",
14+
"hwids": [
15+
[
16+
"0x2E8A",
17+
"0x00C0"
18+
],
19+
[
20+
"0x2E8A",
21+
"0x0003"
22+
]
23+
],
24+
"mcu": "rp2040",
25+
"variant": "waveshare_rp2040_zero"
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+
],
35+
"name": "RP2040 Zero",
36+
"upload": {
37+
"maximum_ram_size": 270336,
38+
"maximum_size": 2097152,
39+
"require_upload_port": true,
40+
"native_usb": true,
41+
"use_1200bps_touch": true,
42+
"wait_for_upload_port": false,
43+
"protocol": "picotool",
44+
"protocols": [
45+
"cmsis-dap",
46+
"jlink",
47+
"raspberrypi-swd",
48+
"picotool",
49+
"picoprobe"
50+
]
51+
},
52+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
53+
"vendor": "Waveshare"
54+
}

tools/makeboards.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def BuildBoot(name):
7070
("IS25LP080 QSPI /2", "boot2_is25lp080_2_padded_checksum"), ("IS25LP080 QSPI /4", "boot2_is25lp080_4_padded_checksum"),
7171
("W25Q080 QSPI /2", "boot2_w25q080_2_padded_checksum"), ("W25Q080 QSPI /4", "boot2_w25q080_4_padded_checksum"),
7272
("W25X10CL QSPI /2", "boot2_w25x10cl_2_padded_checksum"), ("W25X10CL QSPI /4", "boot2_w25x10cl_4_padded_checksum"),
73-
("W25Q64JV QSPI /4", "boot2_w25q64jv_4_padded_checksum") ]:
73+
("W25Q64JV QSPI /4", "boot2_w25q64jv_4_padded_checksum"), ("W25Q16JVxQ QSPI /4", "boot2_w25q16jvxq_4_padded_checksum") ]:
7474
print("%s.menu.boot2.%s=%s" % (name, l[1], l[0]))
7575
print("%s.menu.boot2.%s.build.boot2=%s" % (name, l[1], l[1]))
7676

@@ -393,6 +393,9 @@ def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, f
393393
# Seeed
394394
MakeBoard("seeed_xiao_rp2040", "Seeed", "XIAO RP2040", "0x2e8a", "0x000a", 250, "SEEED_XIAO_RP2040", 2, "boot2_w25q080_2_padded_checksum")
395395

396+
# Waveshare
397+
MakeBoard("waveshare_rp2040_zero", "Waveshare", "RP2040 Zero", "0x2e8a", "0x0003", 500, "WAVESHARE_RP2040_ZERO", 2, "boot2_w25q16jvxq_4_padded_checksum")
398+
396399
# WIZnet
397400
MakeBoard("wiznet_5100s_evb_pico", "WIZnet", "W5100S-EVB-Pico", "0x2e8a", "0x1027", 250, "WIZNET_5100S_EVB_PICO", 2, "boot2_w25q080_2_padded_checksum")
398401
MakeBoard("wiznet_wizfi360_evb_pico", "WIZnet", "WizFi360-EVB-Pico", "0x2e8a", "0x1028", 250, "WIZNET_WIZFI360_EVB_PICO", 2, "boot2_w25q080_2_padded_checksum")
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#pragma once
2+
3+
// Waveshare RP2040 Zero
4+
// https://www.waveshare.com/wiki/RP2040-Zero
5+
// https://www.waveshare.com/w/upload/4/4c/RP2040_Zero.pdf
6+
// https://www.waveshare.com/img/devkit/RP2040-Zero/RP2040-Zero-details-7.jpg
7+
//
8+
// https://www.mischianti.org/2022/09/19/waveshare-rp2040-zero-high-resolution-pinout-and-specs/
9+
// https://www.mischianti.org/wp-content/uploads/2022/09/Waveshare-rp2040-zero-Raspberry-Pi-Pico-alternative-pinout.jpg
10+
11+
/*
12+
Pin# Pin#
13+
___(_____)___
14+
5v 1 | *USB C* | 23 GPIO0
15+
GND 2 | | 22 GPIO1
16+
3.3v 3 | | 21 GPIO2
17+
GPIO29 4 | | 20 GPIO3
18+
GPIO28 5 | | 19 GPIO4
19+
GPIO27 6 | | 18 GPIO5
20+
GPIO26 7 | | 17 GPIO6
21+
GPIO15 8 | | 16 GPIO7
22+
GPIO14 9 |__|_|_|_|_|__| 15 GPIO8
23+
1 1 1 1 1
24+
0 1 2 3 4
25+
26+
Pin10 = GPIO13
27+
Pin11 = GPIO12
28+
Pin12 = GPIO11
29+
Pin13 = GPIO10
30+
Pin14 = GPIO9
31+
*/
32+
33+
// NeoPixel
34+
#define PIN_NEOPIXEL (16u)
35+
//#define LED_BUILTIN PIN_NEOPIXEL
36+
37+
// Serial1
38+
#define PIN_SERIAL1_TX (0u)
39+
#define PIN_SERIAL1_RX (1u)
40+
41+
#define PIN_SERIAL2_TX (8u)
42+
#define PIN_SERIAL2_RX (9u)
43+
44+
// SPI
45+
#define PIN_SPI0_MISO (4u)
46+
#define PIN_SPI0_MOSI (3u)
47+
#define PIN_SPI0_SCK (2u)
48+
#define PIN_SPI0_SS (5u)
49+
50+
#define PIN_SPI1_MISO (12u)
51+
#define PIN_SPI1_MOSI (15u)
52+
#define PIN_SPI1_SCK (14u)
53+
#define PIN_SPI1_SS (13u)
54+
55+
// Wire
56+
#define PIN_WIRE0_SDA (4u)
57+
#define PIN_WIRE0_SCL (5u)
58+
59+
#define PIN_WIRE1_SDA (26u)
60+
#define PIN_WIRE1_SCL (27u)
61+
62+
#define SERIAL_HOWMANY (2u)
63+
#define SPI_HOWMANY (2u)
64+
#define WIRE_HOWMANY (2u)
65+
66+
#include "../generic/common.h"

0 commit comments

Comments
 (0)