Skip to content

Commit 392890e

Browse files
committed
RP_PICO_USB: New USB-enabled version of the stock Pico firmware.
⚠️ Warning: flash/firmware split is now 1Mb/1Mb to accomodate USB libs. BACK UP YOUR PICO before flashing this build. It *will* trash your filesystem. * Add new RP_PICO_USB board * Use commit 932f76c for micropython/micropython@932f76c
1 parent 7b7d9fe commit 392890e

File tree

9 files changed

+89
-3
lines changed

9 files changed

+89
-3
lines changed

.github/workflows/micropython.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types: [created]
88

99
env:
10-
MICROPYTHON_VERSION: master
10+
MICROPYTHON_VERSION: 932f76c6ba64c5a3e68de3324556d9979f09303b
1111

1212
jobs:
1313
build:
@@ -19,6 +19,8 @@ jobs:
1919
include:
2020
- name: pico
2121
board: RPI_PICO
22+
- name: pico_usb
23+
board: RPI_PICO_USB
2224
- name: picow
2325
board: RPI_PICO_W
2426
- name: tiny2040_8mb

ci/micropython.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ function log_warning {
1414

1515
function micropython_clone {
1616
log_inform "Using MicroPython $MICROPYTHON_VERSION"
17-
git clone https://github.com/micropython/micropython --depth=1 --branch=$MICROPYTHON_VERSION
17+
git clone https://github.com/micropython/micropython
1818
cd micropython
19+
git checkout $MICROPYTHON_VERSION
1920
git submodule update --init lib/pico-sdk
2021
git submodule update --init lib/cyw43-driver
2122
git submodule update --init lib/lwip
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"Breadboard friendly",
8+
"Castellated Pads",
9+
"Micro USB"
10+
],
11+
"id": "rp2-pico",
12+
"images": [
13+
"rp2-pico.jpg"
14+
],
15+
"mcu": "rp2040",
16+
"product": "Pico",
17+
"thumbnail": "",
18+
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico/",
19+
"vendor": "Raspberry Pi"
20+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include("$(PORT_DIR)/boards/manifest.py")
2+
3+
include("../manifest_pico.py")
4+
5+
require("usb-device")
6+
require("usb-device-hid")
7+
require("usb-device-cdc")
8+
require("usb-device-keyboard")
9+
require("usb-device-mouse")
10+
require("usb-device-midi")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cmake file for Raspberry Pi Pico
2+
set(PICO_BOARD "pico")
3+
4+
# Board specific version of the frozen manifest
5+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
6+
7+
set(MICROPY_C_HEAP_SIZE 4096)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Board and hardware specific configuration
2+
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico"
3+
#define MICROPY_HW_FLASH_STORAGE_BYTES (1024 * 1024)
4+
#define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE 1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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

micropython/board/manifest_pico.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
freeze("../modules_py", "interstate75.py")
33

44
freeze("../modules_py", "pimoroni.py")
5-
freeze("../modules_py", "boot.py")
5+
freeze("../modules_py", "boot.py")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../)
2+
3+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
4+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../")
5+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../")
6+
7+
set(CMAKE_C_STANDARD 11)
8+
set(CMAKE_CXX_STANDARD 17)
9+
10+
include(micropython-common)
11+
include(pico_wireless/micropython)
12+
13+
# C++ Magic Memory
14+
include(cppmem/micropython)

0 commit comments

Comments
 (0)