Skip to content

Commit

Permalink
rp2/boards/PICO_W: Add new Pico W board, an RP2040 with WiFi.
Browse files Browse the repository at this point in the history
Work done in collaboration with Graham Sanderson and Peter Harper.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Jun 30, 2022
1 parent 50e4655 commit 99c2589
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ports/rp2/boards/PICO_W/board.json
@@ -0,0 +1,21 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"Breadboard friendly",
"Castellated Pads",
"Micro USB",
"WiFi"
],
"id": "rp2-pico-w",
"images": [
"rp2-pico-w.jpg"
],
"mcu": "rp2040",
"product": "Pico W",
"thumbnail": "",
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico/",
"vendor": "Raspberry Pi"
}
7 changes: 7 additions & 0 deletions ports/rp2/boards/PICO_W/manifest.py
@@ -0,0 +1,7 @@
include("../manifest.py")

freeze("$(MPY_DIR)/tools", "upip.py")
freeze("$(MPY_DIR)/tools", "upip_utarfile.py")

if os.path.isdir(convert_path("$(MPY_LIB_DIR)")):
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
8 changes: 8 additions & 0 deletions ports/rp2/boards/PICO_W/mpconfigboard.cmake
@@ -0,0 +1,8 @@
# cmake file for Raspberry Pi Pico W
set(MICROPY_BOARD PICO_W)

set(MICROPY_PY_LWIP ON)
set(MICROPY_PY_NETWORK_CYW43 ON)

# Board specific version of the frozen manifest
set(MICROPY_FROZEN_MANIFEST ${CMAKE_SOURCE_DIR}/boards/PICO_W/manifest.py)
26 changes: 26 additions & 0 deletions ports/rp2/boards/PICO_W/mpconfigboard.h
@@ -0,0 +1,26 @@
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W"

// todo: We need something to check our binary size
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024)

#define MICROPY_PY_NETWORK 1
#define MICROPY_PY_USOCKET 1
#define MICROPY_PY_USSL 1

// CYW43 driver configuration.
#define CYW43_USE_SPI (1)
#define CYW43_LWIP (1)
#define CYW43_GPIO (1)
#define CYW43_SPI_PIO (1)

// For debugging mbedtls - also set
// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose
// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1

#define MICROPY_HW_PIN_CYW43_COUNT CYW43_WL_GPIO_COUNT
#ifdef CYW43_WL_GPIO_LED_PIN
#define MICROPY_HW_PIN_CYW43_LED_PIN_NUM CYW43_WL_GPIO_LED_PIN
#endif

#define MICROPY_HW_PIN_RESERVED(i) ((i) == CYW43_PIN_WL_HOST_WAKE || (i) == CYW43_PIN_WL_REG_ON)

0 comments on commit 99c2589

Please sign in to comment.