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
Raspberry Pi RP2350 Pico SDK Examples - Early Access
RP2350 Instructions
Everything below this section is from the stock pico-examples, so ignore URLs etc., but generally instructions are the same.
The Pico SDK default continues to be to build for RP2040 (PICO_PLATFORM=rp2040), so to build for RP2350, you need to pass
-DPICO_PLATFORM=rp2350 to CMake (or -DPICO_PLATFORM=rp2350-riscv for RISC-V).
Most, but not all examples, currently work on RP2350 however you should be able to do a full build with any of the above platforms (PICO_PLATFORM=host however currently fails on some examples)
Obliterate the contents of flash. An example of a NO_FLASH binary (UF2 loaded directly into SRAM and runs in-place there). A useful utility to drag and drop onto your Pico if the need arises.
Blinks the on-board LED (which is connected via the WiFi chip) with a slower system clock to show how to reconfigure communication with the WiFi chip under those circumstances
Runs the lwip-contrib/apps/ping test app under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode. The test app uses the lwIP socket API in this case.
Runs a LWIP HTTP server test app under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode.
Pico W Bluetooth
These examples are for the Pico W, and are only available for PICO_BOARD=pico_w.
They are examples from the Blue Kitchen Bluetooth stack, see here for a full description.
By default, the Bluetooth examples are only built in one "mode" only (background, poll, or freertos), with the
default being background. This can be changed by passing -DBTSTACK_EXAMPLE_TYPE=poll etc. to CMake, or all
examples can be built (which may be slow) by passing -DBTSTACK_EXAMPLE_TYPE=all
Freertos versions can only be built if FREERTOS_KERNEL_PATH is defined.
The Bluetooth examples that use audio require code in pico-extras. Pass -DPICO_EXTRAS_PATH=${HOME}/pico-extras on the cmake command line or define PICO_EXTRAS_PATH=${HOME}/pico-extras in your environment and re-run cmake to include them in the build.
An LED blink with the pico_bootsel_via_double_reset library linked. This enters the USB bootloader when it detects the system being reset twice in quick succession, which is useful for boards with a reset button but no BOOTSEL button.
Use some other UART features like RX interrupts, hardware control flow, and data formats other than 8n1.
Universal
These are examples of how to build universal binaries which run on RP2040, and RP2350 Arm & RISC-V.
These require you to set PICO_ARM_TOOLCHAIN_PATH and PICO_RISCV_TOOLCHAIN_PATH to appropriate paths, to ensure you have compilers for both architectures.
Same as the nuke example, but universal. On RP2350 runs as a packaged SRAM binary, so is written to flash and copied to SRAM by the bootloader
USB Device
TinyUSB Examples
Most of the USB device examples come directly from the TinyUSB device examples directory here.
Those that are supported on RP2040 devices are automatically included as part of the pico-examples
build as targets named tinyusb_dev_<example_name>, e.g. https://github.com/hathach/tinyusb/tree/master/examples/device/hid_composite
is built as tinyusb_dev_hid_composite.
At the time of writing, these examples are available:
tinyusb_dev_audio_4_channel_mic
tinyusb_dev_audio_test
tinyusb_dev_board_test
tinyusb_dev_cdc_dual_ports
tinyusb_dev_cdc_msc
tinyusb_dev_dfu
tinyusb_dev_dfu_runtime
tinyusb_dev_dynamic_configuration
tinyusb_dev_hid_composite
tinyusb_dev_hid_generic_inout
tinyusb_dev_hid_multiple_interface
tinyusb_dev_midi_test
tinyusb_dev_msc_dual_lun
tinyusb_dev_net_lwip_webserver
tinyusb_dev_uac2_headset
tinyusb_dev_usbtmc
tinyusb_dev_video_capture
tinyusb_dev_webusb_serial
Whilst these examples ably demonstrate how to use TinyUSB in device mode, their CMakeLists.txt is set up in a way
tailored to how TinyUSB builds their examples within their source tree.
For a better example of how to configure CMakeLists.txt for using TinyUSB in device mode with the Raspberry Pi SDK
see below:
A copy of the TinyUSB device example with the same name, but with a CMakeLists.txt which demonstrates how to add a dependency on the TinyUSB device libraries with the Raspberry Pi Pico SDK
A USB Bulk loopback implemented with direct access to the USB hardware (no TinyUSB)
USB Host
All the USB host examples come directly from the TinyUSB host examples directory here.
Those that are supported on RP2040 devices are automatically included as part of the pico-examples
build as targets named tinyusb_host_<example_name>, e.g. https://github.com/hathach/tinyusb/tree/master/examples/host/cdc_msc_hid
is built as tinyusb_host_cdc_msc_hid.
At the time of writing, there is only one host example available:
tinyusb_host_cdc_msc_hid
USB Dual Mode
USB Dual Mode uses PIO as a USB host controller and the RP2040 USB device controller as a device controller. All the USB dual examples come directly from the TinyUSB dual examples directory here.
Those that are supported on RP2040 devices are automatically included as part of the pico-examples
build as targets named tinyusb_dual_<example_name>, e.g. https://github.com/hathach/tinyusb/tree/master/examples/dual/host_hid_to_device_cdc
is built as tinyusb_dual_host_hid_to_device_cdc.
At the time of writing, there is only one dual example available: