From 616e12055848ae06764d5b21786e980dd18f86a6 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Wed, 30 Nov 2022 19:08:04 +0000 Subject: [PATCH] Add information on targetting the Pico W. Fixes #895 (#896) * Add information on targetting the Pico W Based on comments in https://github.com/raspberrypi/pico-sdk/issues/895 which pointed here: https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf I didn't add the pdf link as there are no links to other pdfs. * Rewording * stray comma Co-authored-by: Graham Sanderson --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26084ca..6e19527 100644 --- a/README.md +++ b/README.md @@ -159,14 +159,23 @@ instructions for other platforms, and just in general, we recommend you see [Ras Note this example uses the default UART for _stdout_; if you want to use the default USB see the [hello-usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example. - 1. Setup a CMake build directory. For example, if not using an IDE: ``` $ mkdir build $ cd build $ cmake .. - ``` + ``` + + 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=pico_w ..` + to configure the SDK and build options accordingly for that particular board. + + Doing so sets up various compiler defines (e.g. default pin numbers for UART and other hardware) and in certain + cases also enables the use of additional libraries (e.g. wireless support when building for `PICO_BOARD=pico_w`) which cannot + be built without a board which provides the requisite functionality. + + For a list of boards defined in the SDK itself, look in [this directory](src/boards/include/boards) which has a + header for each named board. 1. Make your target from the build directory you created. ```sh