8000 rp2: Allow pico to use cyw43. · micropython/micropython@57472a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57472a3

Browse files
committed
rp2: Allow pico to use cyw43.
1 parent dc538e5 commit 57472a3

File tree

8 files changed

+103
-0
lines changed

8 files changed

+103
-0
lines changed

ports/rp2/boards/RPI_PICO/manifest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is only used if cyw43 is enabled
2+
include("$(PORT_DIR)/boards/manifest.py")
3+
4+
require("bundle-networking")
5+
6+
# Bluetooth
7+
require("aioble")
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# cmake file for Raspberry Pi Pico
22
set(PICO_BOARD "pico")
33
set(PICO_PLATFORM "rp2040")
4+
5+
if (PICO_CYW43_SUPPORTED)
6+
include(enable_cyw43.cmake)
7+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
8+
set(PICO_PINS_CSV_NAME pins_cyw43.csv)
9+
endif()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
// Board and hardware specific configuration
22
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico"
3+
4+
#if MICROPY_PY_NETWORK_CYW43
5+
// we have to reduce the flash storage if cyw43 is enabled or else the firmware gets overwritten
6+
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024)
7+
#include "enable_cyw43.h"
8+
#define CYW43_PIN_WL_DYNAMIC 1
9+
#define CYW43_PIO_CLOCK_DIV_DYNAMIC 1
10+
#else
311
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)
12+
#endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
LED,GPIO25
29+
WL_GPIO0,EXT_GPIO0
30+
WL_GPIO1,EXT_GPIO1
31+
WL_GPIO2,EXT_GPIO2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is only used if cyw43 is enabled
2+
include("$(PORT_DIR)/boards/manifest.py")
3+
4+
require("bundle-networking")
5+
6+
# Bluetooth
7+
require("aioble")

ports/rp2/boards/RPI_PICO2/mpconfigboard.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ set(PICO_BOARD "pico2")
33

44
# To change the gpio count for QFN-80
55
# set(PICO_NUM_GPIOS 48)
6+
7+
if (PICO_CYW43_SUPPORTED)
8+
include(enable_cyw43.cmake)
9+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
10+
set(PICO_PINS_CSV_NAME pins_cyw43.csv)
11+
endif()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
// Board and hardware specific configuration
22
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico2"
33
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - 1024 * 1024)
4+
5+
#if MICROPY_PY_NETWORK_CYW43
6+
#include "enable_cyw43.h"
7+
#define CYW43_PIN_WL_DYNAMIC 1
8+
#define CYW43_PIO_CLOCK_DIV_DYNAMIC 1
9+
#endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
LED,GPIO25
29+
WL_GPIO0,EXT_GPIO0
30+
WL_GPIO1,EXT_GPIO1
31+
WL_GPIO2,EXT_GPIO2

0 commit comments

Comments
 (0)
0