Skip to content

Commit 4407f8c

Browse files
authored
Add a build script for Raspberry Pi Pico W (#598)
* make a build script for pico W * add build scipt for pico W
1 parent 5fa9b70 commit 4407f8c

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ This file can be found in `$BUILD_DIR/micropython/ports/esp32/boards/TINYPICO/`.
363363

364364
### RP2-based boards
365365

366-
RP2 firmware can be compiled either by downloading and running the single [build script](https://github.com/v923z/micropython-ulab/blob/master/build/rp2.sh), or executing the commands below.
366+
RP2 firmware can be compiled either by downloading and running the single [build script](https://github.com/v923z/micropython-ulab/blob/master/build/rp2.sh)/[build script for Pico W](https://github.com/v923z/micropython-ulab/blob/master/build/rp2w.sh), or executing the commands below.
367367

368368
First, clone `micropython`:
369369

build/rp2w.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
export BOARD=PICO_W
4+
export BUILD_DIR=$(pwd)
5+
export MPY_DIR=$BUILD_DIR/micropython
6+
export ULAB_DIR=$BUILD_DIR/../code
7+
8+
if [ ! -d $ULAB_DIR ]; then
9+
printf "Cloning ulab\n"
10+
ULAB_DIR=$BUILD_DIR/ulab/code
11+
git clone https://github.com/v923z/micropython-ulab.git ulab
12+
fi
13+
14+
if [ ! -d $MPY_DIR ]; then
15+
printf "Cloning MicroPython\n"
16+
git clone https://github.com/micropython/micropython.git micropython
17+
fi
18+
19+
cd $MPY_DIR
20+
git submodule update --init
21+
cd ./mpy-cross && make # build cross-compiler (required)
22+
23+
cd $MPY_DIR/ports/rp2
24+
make BOARD=$BOARD clean
25+
make USER_C_MODULES=$ULAB_DIR/micropython.cmake BOARD=$BOARD

0 commit comments

Comments
 (0)