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
Copy file name to clipboardExpand all lines: README.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,12 +177,11 @@ instructions for other platforms, and just in general, we recommend you see [Ras
177
177
1. Setup a CMake build directory.
178
178
For example, if not using an IDE:
179
179
```
180
-
$ mkdir build
181
-
$ cd build
182
-
$ cmake ..
183
-
```
180
+
$ cmake -S . -B build
181
+
```
182
+
> The cmake -S flag indicates the source directory, and the -B flag tells cmake the name of the output-directory to create. This doesn't have to be named "build", you can call it whatever you want.
184
183
185
-
When building for a board other than the Raspberry Pi Pico, you should pass `-DPICO_BOARD=board_name` to the `cmake` command above, e.g. `cmake -DPICO_BOARD=pico2 ..` or `cmake -DPICO_BOARD=pico_w ..` to configure the SDK and build options accordingly for that particular board.
184
+
When building for a board other than the Raspberry Pi Pico, you should pass `-DPICO_BOARD=board_name` to the `cmake` command above, e.g. `cmake -S . -B build -DPICO_BOARD=pico2` or `cmake -S . -B build -DPICO_BOARD=pico_w` to configure the SDK and build options accordingly for that particular board.
186
185
187
186
Specifying `PICO_BOARD=<boardname>` sets up various compiler defines (e.g. default pin numbers for UART and other hardware) and in certain
188
187
cases also enables the use of additional libraries (e.g. wireless support when building for `PICO_BOARD=pico_w`) which cannot
@@ -193,11 +192,32 @@ instructions for other platforms, and just in general, we recommend you see [Ras
193
192
194
193
1. Make your target from the build directory you created.
195
194
```sh
196
-
$ make hello_world
195
+
$ cmake --build build --target hello_world
197
196
```
197
+
> The directory-name supplied to the `--build` flag needs to match the directory-name that was passed to the `-B` flag in the earlier cmake command.
198
198
199
199
1. You now have `hello_world.elf` to load via a debugger, or `hello_world.uf2` that can be installed and run on your Raspberry Pi Pico-series device via drag and drop.
200
200
201
201
# RISC-V support on RP2350
202
202
203
203
See [Raspberry Pi Pico-series C/C++ SDK](https://rptl.io/pico-c-sdk) for information on setting up a build environment for RISC-V on RP2350.
204
+
205
+
## RISC-V quick start
206
+
207
+
The [pico-sdk-tools](https://github.com/raspberrypi/pico-sdk-tools/releases) repository contains some prebuilt versions of the RISC-V compiler.
208
+
209
+
You can use these to get a working RISC-V compiler on Raspberry Pi OS for example.
0 commit comments