You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you wish to use RISC-V with the RP2350 (ARM mode is default), you will need a
23
+
`riscv32-unknown-elf-gcc` compiler. You can search for binaries for this, or
24
+
compile the [RISC-V GNU Toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain)
25
+
in multilib mode. You will also need to add symlinks from `riscv64-unknown-*` to
26
+
`riscv32-unknown-elf-*` if you build the toolchain from source. This is because
27
+
the multilib mode compiler is both 32bit and 64bit.
28
+
29
+
### 1. Set an export to the wolfSSL source directory.
30
+
31
+
```
32
+
export WOLFSSL_ROOT=/path/to/wolfssl/source
33
+
```
34
+
35
+
### 2. Setup pico-sdk and set `PICO_SDK_PATH`
36
+
37
+
```
38
+
export PICO_SDK_PATH=/path/to/pico-sdk
39
+
```
40
+
41
+
### 3. cmake and make
42
+
43
+
The following CMAKE options are available:
44
+
45
+
*`PICO_BOARD` - This should be set to `pico` for a Pi Pico, `pico_w` for a Pi Pico with WiFi or `pico2` for a Pi Pico 2. A full list of boards for this option can be found [here](https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards), just ignore the `.h` at the end.
46
+
*`USE_WIFI` - Build the tests that use WiFi, only works when `PICO_BOARD` defined has a CYW43 WiFi chip.
47
+
*`USE_UART` - Output to UART instead of USB, for the Pi Debug Probe.
48
+
*`WIFI_SSID` - The SSID to connect to (if `USE_WIFI` is set).
49
+
*`WIFI_PASSWORD` - The password used for the WiFi network (if `USE_WIFI` is set).
50
+
*`TEST_TCP_SERVER_IP` - The test server to connect to for the TCP client test (if `USE_WIFI` is set).
51
+
52
+
To use the RP2350 in RISC-V mode, add `-DPICO_PLATFORM=rp2350-riscv`.
53
+
54
+
```
55
+
$ cd RPi-Pico
56
+
$ mkdir build
57
+
$ cd build
58
+
$ cmake -DPICO_BOARD=pico_w ..
59
+
$ make
60
+
```
61
+
62
+
### 4. Upload to the Pico
63
+
64
+
Hold the boot button and plug the Pico into your computer, you can then
65
+
drag/drop a `.uf2` to the Pico. It will stop becoming a USB mass storage device
66
+
and run immediately once the upload is complete. Alternatively, you can use
67
+
[picotool](https://github.com/raspberrypi/picotool) to upload a file:
68
+
69
+
```
70
+
sudo picotool load benchmark.uf2
71
+
sudo picotool reboot
72
+
```
73
+
74
+
### 5. Serial output
75
+
76
+
If you have not set `USE_UART`, once rebooted the USB port will turn into an
77
+
"Abstract Control Module" serial port. On Linux this will likely be
78
+
`/dev/ttyACM0`, or a number higher than `0` if you already have one. On macOS
79
+
this will be something like `/dev/cu.usbmodemXXXX`. The baud rate of this port
80
+
is 115200.
81
+
82
+
In Linux, most repositories have `minicom`. Install this using your package
83
+
manager and run:
84
+
85
+
```
86
+
minicom -b 115200 -o -D /dev/ttyACM0
87
+
```
88
+
89
+
If you need to exit at any time, it is CTRL-A followed by CTRL-X.
0 commit comments