Skip to content

Commit 8dcf929

Browse files
mattytrentinidpgeorge
authored andcommitted
rp2/boards/WEACTSTUDIO_RP2350B_CORE: Add WeAct Studio RP2350B Core.
Signed-off-by: Matt Trentini <[email protected]>
1 parent 9a070fe commit 8dcf929

File tree

8 files changed

+163
-0
lines changed

8 files changed

+163
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Dual-core",
8+
"External Flash",
9+
"External RAM",
10+
"USB-C"
11+
],
12+
"images": [
13+
"weactstudio_rp2350_core.png"
14+
],
15+
"mcu": "rp2350",
16+
"product": "RP2350B Core",
17+
"thumbnail": "",
18+
"url": "https://github.com/WeActStudio/WeActStudio.RP2350BCoreBoard",
19+
"variants": {
20+
"RISCV": "RISC V"
21+
},
22+
"vendor": "WeAct Studio"
23+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include("$(PORT_DIR)/boards/manifest.py")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CMake file for WeAct Studio RP2350B Core
2+
3+
# The Core is powered by an RP2350B with 48 GPIOs
4+
set(PICO_NUM_GPIOS 48)
5+
6+
# The WeAct Studio boards don't have official pico-sdk support.
7+
# So, add this board directory to the header search path and define PICO_BOARD
8+
# which will instruct pico-sdk to look for weactstudio_rp2350b_core.h
9+
list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR})
10+
set(PICO_BOARD "weactstudio_rp2350b_core")
11+
12+
# Freeze manifest and modules
13+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Board and hardware specific configuration
2+
#define MICROPY_HW_BOARD_NAME "WeAct Studio RP2350B Core"
3+
#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024)
4+
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (2 * 1024 * 1024))
5+
6+
// TODO: Split PSRAM option off as a variant
7+
#define MICROPY_HW_PSRAM_CS_PIN (0)
8+
#define MICROPY_HW_ENABLE_PSRAM (0)
9+
10+
// Override machine_uart.c definitions.
11+
// See weactstudio_rp2350b.h and note that the PICO_DEFAULT_UART configuration
12+
// is not currently referenced in machine_uart.c.
13+
#define MICROPY_HW_UART0_TX (16)
14+
#define MICROPY_HW_UART0_RX (17)
15+
#define MICROPY_HW_UART0_CTS (-1)
16+
#define MICROPY_HW_UART0_RTS (-1)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the ARM-based RP2350 platform
2+
set(PICO_PLATFORM "rp2350")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the RISC-V-based RP2350 platform
2+
set(PICO_PLATFORM "rp2350-riscv")
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
GP0,GPIO0
2+
GP1,GPIO1
3+
GP2,GPIO2
4+
GP3,GPIO3
5+
GP4,GPIO4
6+
GP5,GPIO5
7+
GP6,GPIO6
8+
GP7,GPIO7
9+
GP8,GPIO8
10+
GP9,GPIO9
11+
GP10,GPIO10
12+
GP11,GPIO11
13+
GP12,GPIO12
14+
GP13,GPIO13
15+
GP14,GPIO14
16+
GP15,GPIO15
17+
GP16,GPIO16
18+
GP17,GPIO17
19+
GP18,GPIO18
20+
GP19,GPIO19
21+
GP20,GPIO20
22+
GP21,GPIO21
23+
GP22,GPIO22
24+
GP25,GPIO25
25+
GP26,GPIO26
26+
GP27,GPIO27
27+
GP28,GPIO28
28+
GP29,GPIO29
29+
GP30,GPIO30
30+
GP31,GPIO31
31+
GP32,GPIO32
32+
GP33,GPIO33
33+
GP34,GPIO34
34+
GP35,GPIO35
35+
GP36,GPIO36
36+
GP37,GPIO37
37+
GP38,GPIO38
38+
GP39,GPIO39
39+
GP40,GPIO40
40+
GP41,GPIO41
41+
GP42,GPIO42
42+
GP43,GPIO43
43+
GP44,GPIO44
44+
GP45,GPIO45
45+
GP46,GPIO46
46+
GP47,GPIO47
47+
KEY,GPIO23
48+
LED,GPIO25
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#ifndef _BOARDS_WEACTSTUDIO_RP2350B_CORE_COMMON_H
2+
#define _BOARDS_WEACTSTUDIO_RP2350B_CORE_COMMON_H
3+
4+
// --- LED ---
5+
#ifndef PICO_DEFAULT_LED_PIN
6+
#define PICO_DEFAULT_LED_PIN 25
7+
#endif
8+
9+
// Note: Avoid using Pin 0 for any default peripheral since it can be used for
10+
// extra PSRAM/flash
11+
12+
// --- UART ---
13+
#ifndef PICO_DEFAULT_UART
14+
#define PICO_DEFAULT_UART 0
15+
#endif
16+
#ifndef PICO_DEFAULT_UART_TX_PIN
17+
#define PICO_DEFAULT_UART_TX_PIN 12
18+
#endif
19+
#ifndef PICO_DEFAULT_UART_RX_PIN
20+
#define PICO_DEFAULT_UART_RX_PIN 13
21+
#endif
22+
23+
// --- I2C ---
24+
#ifndef PICO_DEFAULT_I2C
25+
#define PICO_DEFAULT_I2C 0
26+
#endif
27+
#ifndef PICO_DEFAULT_I2C_SDA_PIN
28+
#define PICO_DEFAULT_I2C_SDA_PIN 8
29+
#endif
30+
#ifndef PICO_DEFAULT_I2C_SCL_PIN
31+
#define PICO_DEFAULT_I2C_SCL_PIN 9
32+
#endif
33+
34+
// --- SPI ---
35+
#ifndef PICO_DEFAULT_SPI
36+
#define PICO_DEFAULT_SPI 0
37+
#endif
38+
#ifndef PICO_DEFAULT_SPI_SCK_PIN
39+
#define PICO_DEFAULT_SPI_SCK_PIN 18
40+
#endif
41+
#ifndef PICO_DEFAULT_SPI_TX_PIN
42+
#define PICO_DEFAULT_SPI_TX_PIN 19
43+
#endif
44+
#ifndef PICO_DEFAULT_SPI_RX_PIN
45+
#define PICO_DEFAULT_SPI_RX_PIN 16
46+
#endif
47+
#ifndef PICO_DEFAULT_SPI_CSN_PIN
48+
#define PICO_DEFAULT_SPI_CSN_PIN 17
49+
#endif
50+
51+
// Flash configuration
52+
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
53+
54+
#ifndef PICO_FLASH_SPI_CLKDIV
55+
#define PICO_FLASH_SPI_CLKDIV 2
56+
#endif
57+
58+
#endif

0 commit comments

Comments
 (0)