diff options
8 files changed, 163 insertions, 0 deletions
diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/board.json b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/board.json new file mode 100644 index 000000000..bd280820f --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/board.json @@ -0,0 +1,23 @@ +{ + "deploy": [ + "../deploy.md" + ], + "docs": "", + "features": [ + "Dual-core", + "External Flash", + "External RAM", + "USB-C" + ], + "images": [ + "weactstudio_rp2350_core.png" + ], + "mcu": "rp2350", + "product": "RP2350B Core", + "thumbnail": "", + "url": "https://github.com/WeActStudio/WeActStudio.RP2350BCoreBoard", + "variants": { + "RISCV": "RISC V" + }, + "vendor": "WeAct Studio" +} diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/manifest.py b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/manifest.py new file mode 100644 index 000000000..832942f05 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/manifest.py @@ -0,0 +1 @@ +include("$(PORT_DIR)/boards/manifest.py") diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.cmake b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.cmake new file mode 100644 index 000000000..f03452c62 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.cmake @@ -0,0 +1,13 @@ +# CMake file for WeAct Studio RP2350B Core + +# The Core is powered by an RP2350B with 48 GPIOs +set(PICO_NUM_GPIOS 48) + +# The WeAct Studio boards don't have official pico-sdk support. +# So, add this board directory to the header search path and define PICO_BOARD +# which will instruct pico-sdk to look for weactstudio_rp2350b_core.h +list(APPEND PICO_BOARD_HEADER_DIRS ${MICROPY_BOARD_DIR}) +set(PICO_BOARD "weactstudio_rp2350b_core") + +# Freeze manifest and modules +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.h b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.h new file mode 100644 index 000000000..1f0963db8 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigboard.h @@ -0,0 +1,16 @@ +// Board and hardware specific configuration +#define MICROPY_HW_BOARD_NAME "WeAct Studio RP2350B Core" +#define PICO_FLASH_SIZE_BYTES (16 * 1024 * 1024) +#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (2 * 1024 * 1024)) + +// TODO: Split PSRAM option off as a variant +#define MICROPY_HW_PSRAM_CS_PIN (0) +#define MICROPY_HW_ENABLE_PSRAM (0) + +// Override machine_uart.c definitions. +// See weactstudio_rp2350b.h and note that the PICO_DEFAULT_UART configuration +// is not currently referenced in machine_uart.c. +#define MICROPY_HW_UART0_TX (16) +#define MICROPY_HW_UART0_RX (17) +#define MICROPY_HW_UART0_CTS (-1) +#define MICROPY_HW_UART0_RTS (-1) diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant.cmake b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant.cmake new file mode 100644 index 000000000..531c91524 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant.cmake @@ -0,0 +1,2 @@ +# Set the ARM-based RP2350 platform +set(PICO_PLATFORM "rp2350") diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant_RISCV.cmake b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant_RISCV.cmake new file mode 100644 index 000000000..9f62e459a --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/mpconfigvariant_RISCV.cmake @@ -0,0 +1,2 @@ +# Set the RISC-V-based RP2350 platform +set(PICO_PLATFORM "rp2350-riscv") diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/pins.csv b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/pins.csv new file mode 100644 index 000000000..50d0de856 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/pins.csv @@ -0,0 +1,48 @@ +GP0,GPIO0 +GP1,GPIO1 +GP2,GPIO2 +GP3,GPIO3 +GP4,GPIO4 +GP5,GPIO5 +GP6,GPIO6 +GP7,GPIO7 +GP8,GPIO8 +GP9,GPIO9 +GP10,GPIO10 +GP11,GPIO11 +GP12,GPIO12 +GP13,GPIO13 +GP14,GPIO14 +GP15,GPIO15 +GP16,GPIO16 +GP17,GPIO17 +GP18,GPIO18 +GP19,GPIO19 +GP20,GPIO20 +GP21,GPIO21 +GP22,GPIO22 +GP25,GPIO25 +GP26,GPIO26 +GP27,GPIO27 +GP28,GPIO28 +GP29,GPIO29 +GP30,GPIO30 +GP31,GPIO31 +GP32,GPIO32 +GP33,GPIO33 +GP34,GPIO34 +GP35,GPIO35 +GP36,GPIO36 +GP37,GPIO37 +GP38,GPIO38 +GP39,GPIO39 +GP40,GPIO40 +GP41,GPIO41 +GP42,GPIO42 +GP43,GPIO43 +GP44,GPIO44 +GP45,GPIO45 +GP46,GPIO46 +GP47,GPIO47 +KEY,GPIO23 +LED,GPIO25 diff --git a/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/weactstudio_rp2350b_core.h b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/weactstudio_rp2350b_core.h new file mode 100644 index 000000000..bb00ff282 --- /dev/null +++ b/ports/rp2/boards/WEACTSTUDIO_RP2350B_CORE/weactstudio_rp2350b_core.h @@ -0,0 +1,58 @@ +#ifndef _BOARDS_WEACTSTUDIO_RP2350B_CORE_COMMON_H +#define _BOARDS_WEACTSTUDIO_RP2350B_CORE_COMMON_H + +// --- LED --- +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 25 +#endif + +// Note: Avoid using Pin 0 for any default peripheral since it can be used for +// extra PSRAM/flash + +// --- UART --- +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 0 +#endif +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 12 +#endif +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 13 +#endif + +// --- I2C --- +#ifndef PICO_DEFAULT_I2C +#define PICO_DEFAULT_I2C 0 +#endif +#ifndef PICO_DEFAULT_I2C_SDA_PIN +#define PICO_DEFAULT_I2C_SDA_PIN 8 +#endif +#ifndef PICO_DEFAULT_I2C_SCL_PIN +#define PICO_DEFAULT_I2C_SCL_PIN 9 +#endif + +// --- SPI --- +#ifndef PICO_DEFAULT_SPI +#define PICO_DEFAULT_SPI 0 +#endif +#ifndef PICO_DEFAULT_SPI_SCK_PIN +#define PICO_DEFAULT_SPI_SCK_PIN 18 +#endif +#ifndef PICO_DEFAULT_SPI_TX_PIN +#define PICO_DEFAULT_SPI_TX_PIN 19 +#endif +#ifndef PICO_DEFAULT_SPI_RX_PIN +#define PICO_DEFAULT_SPI_RX_PIN 16 +#endif +#ifndef PICO_DEFAULT_SPI_CSN_PIN +#define PICO_DEFAULT_SPI_CSN_PIN 17 +#endif + +// Flash configuration +#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 2 +#endif + +#endif |
