summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/rp2/boards/PICO_W/board.json21
-rw-r--r--ports/rp2/boards/PICO_W/manifest.py7
-rw-r--r--ports/rp2/boards/PICO_W/mpconfigboard.cmake8
-rw-r--r--ports/rp2/boards/PICO_W/mpconfigboard.h26
4 files changed, 62 insertions, 0 deletions
diff --git a/ports/rp2/boards/PICO_W/board.json b/ports/rp2/boards/PICO_W/board.json
new file mode 100644
index 000000000..755ba1037
--- /dev/null
+++ b/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"
+}
diff --git a/ports/rp2/boards/PICO_W/manifest.py b/ports/rp2/boards/PICO_W/manifest.py
new file mode 100644
index 000000000..1953d5cbd
--- /dev/null
+++ b/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")
diff --git a/ports/rp2/boards/PICO_W/mpconfigboard.cmake b/ports/rp2/boards/PICO_W/mpconfigboard.cmake
new file mode 100644
index 000000000..d3fbce699
--- /dev/null
+++ b/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)
diff --git a/ports/rp2/boards/PICO_W/mpconfigboard.h b/ports/rp2/boards/PICO_W/mpconfigboard.h
new file mode 100644
index 000000000..f467234fb
--- /dev/null
+++ b/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)