This is a minor release of the SDK with many bug fixes and documentation improvements, along with some new features.
Highlights are listed below, or you can see the full list of individual commits here, and the full list of resolved issues here.
Board Support
The following board configurations have been added and may be specified via PICO_BOARD
:
adafruit_feather_rp2040_adalogger
adafruit_fruit_jam
eelectronicparts_picomini_2mb
eelectronicparts_picomini_4mb
eelectronicparts_picomini_8mb
eelectronicparts_picomini_16mb
olimex_rp2350_xl
olimex_rp2350_xxl
sparkfun_iotredboard_rp2350
sparkfun_xrp_controller
uugear_wittypi5_hat_plus
waveshare_rp2350_usb_a
weact_studio_rp2350b_core
wiznet_w5100s_evb_pico2
The following board configurations have been modified:
hellbender_2350A_devboard
- Updated for release version of the board
New Features
Encrypted binaries
Support has been added for creating self-decrypting binaries, to make creating and using binaries
with secret/private code easier.
A self-decrypting binary is an encrypted binary with an embedded bootloader that decrypts the main application into SRAM at runtime, and can be utilized via use of pico_encrypt_binary
in your CMakeLists.txt file.
See the hello_encrypted
and hello_encrypted_mbedtls
examples, and section 4.2 of the C/C++ SDK book for more details.
There are two choices of embedded bootloader:
- A slower, hardened one with side-channel resistance
- A faster one based on Mbed TLS
NOTE: This feature introduces a breaking change to the pico_encrypt_binary
function which now requires an IVFILE
in addition to the AESFILE
. If you invoke it without an IVFILE
(as was the case prior to this release) then you will get the CMake error pico_encrypt_binary Function invoked with incorrect arguments
.
Wi-Fi Firmware Partition Support
Support has been added for storing Wi-Fi firmware in a separate partition on RP2350 based boards such as Pico 2 W.
The main binary and the Wi-Fi firmware blob are kept as separate UF2s, to reduce the size of the main UF2 file. This avoids copying the whole Wi-Fi firmware blob on every UF2 upload.
This feature can be enabled by calling pico_use_wifi_firmware_partition
in your CMakeLists.txt file. For more details see the documentation for that function in the C/C++ SDK book
New Library
pico_status_led
Most RP2-series microcontroller boards come with either a single-color LED, a multicolored WS2812 LED, or both. The pico_status_led
library has been added to simplify dealing with both types of LED, and the complications of the single-color LED being attached to the Wi-Fi chip - not a regular GPIO - on boards like Pico W and Pico 2 W.
- Added
status_led_init()
,status_led_init_with_context()
andstatus_led_deinit()
to perform initialization and cleanup - Added
status_led_supported()
to determine if the single-color status LED APIs are available. Note that the single-color status LED is the one specified viaPICO_DEFAULT_LED_PIN
or the one attached to the WiFi chip on Pico 2 or Pico 2 W - Added
status_let_set_state()
to turn the single-color status LED on and/off - Added
status_led_get_state()
to get the on/off state of the single-color status LED - Added
status_led_via_colored_state()
to determine if the single-color status LED API functionsstatus_let_set_state()
andstatus_let_get_state()
can be used to control the multicolor status LED (as is the default on boards with a multicolor LED but no single-color LED) - Added
colored_status_led_supported()
to determine if the multicolor status LED APIs are available. Note that the multicolor status LED is the one specified viaPICO_DEFAULT_WS2812_PIN
- Added
colored_status_let_set_state()
to turn the multicolor status LED on and/off - Added
colored_status_led_get_state()
to get the on/off state of the single-color status LED - Added
colored_status_led_set_on_with_color()
to turn on the multicolored LED and set the color - Added
colored_status_led_get_on_color()
to get the multicolored LED "on" color - Note: pico_status_led is available on
PLATFORM=host
too, though does nothing
Notable Library Changes/Improvements
hardware_dma
- Added
channel_config_set_read_address_update_type()
andchannel_config_set_write_address_update_type()
to surface all four RP2350 address update modes (none, increment, increment_by_two, decrement). The method may be used on RP2040 to set either of the first two modes - Re-implemented
channel_config_set_read_increment
andchannel_config_set_write_increment
using these new methods. This is a minor functional change from the previous release, in that these methods now clear the additional configuration bit added in RP2350 that selects the new increment_by_two and decrement modes) - Prefer type name
dma_channel_config_t
overdma_channel_config
for consistency with other libraries - Updated the documentation for
dma_channel_set_transfer_count()
,dma_channel_configure()
,dma_channel_transfer_from_buffer_now
anddma_channel_transfer_tobuffer_now
to make it explicit that these methods take a 4 bit mode and 28 bit transfer_count on RP2350 vs a 32 bit transfer_count on RP2040 - Added
dma_encode_transfer_count()
,dma_encode_transfer_count_with_self_trigger()
anddma_encode_endless_transfer_count()
as convenience methods to safely encode theencoded_transfer_count
argument to these functions
hardware_gpio
gpio_acknowledge_irq
has been made inline to improve performance
hardware_irq
- Added Arm Cortex-M33 specific interrupt stubs (weak) that the application can override (
isr_memmanage
,isr_busfault
,isr_usagefault
,isr_securefault
,isr_debugmonitor
) - Added code to (re-)enable interrupts during runtime initialization on RP2350 (in case a previous bootloader stage disabled them)
- Made
irq_has_handler()
available even whenPICO_DISABLE_SHARED_IRQ_HANDLERS=1
- Added
PICO_MINIMAL_STORED_VECTOR_TABLE
, which can be set to 1 to save space by only storing a minimal vector table in the binary. In this case, add any exception or IRQ handlers to the RAM vector table at runtime - Added
PICO_NUM_IRQ_HANDLERS
, which can be set to the number of IRQ handlers you want in either vector table. This can save space in the vector table if you know that you don't need higher numbered IRQs
hardware_flash
flash_range_erase
,flash_range_program
andflash_do_cmd
now preserve the QSPI pad state over flash access calls- Added
flash_start_xip()
to explicitly perform a first-time XIP setup (including initialising pads) similar to that which would be done when entering a flash binary via the bootrom. This is mostly useful forno_flash
binaries that access an attached external flash
hardware_pio
- Allowed
pio_encode_sideset_opt(0, value)
which is a valid instruction encoding
hardware_powman
- Fixed a bug that made
powman_timer_set_1khz_tick_source_gpio()
andpowman_timer_enable_gpio_1hz_sync()
work incorrectly depending on which GPIO was used - Fixed a bug in
powman_get_power_state()
which meant that the state bits were returned inverted - Fixed a bug in
powman_timer_set_1khz_tick_source_lposc_with_hz()
andpowman_timer_set_1khz_tick_source_xosc_with_hz()
which caused them to mangle the low 3 decimal digits of the specified source frequency - Improved the validation and handling of various
powman_configure_wakeup_state()
state transitions
hardware_rcp
- Added
rcp_is_true()
which is safe on code that might run on RISC-V as opposed tovalue == RCP_MASK_TRUE
which isn't
hardware_watchdog
- Added
watchdog_get_time_remaining_us()
to complementwatchdog_get_time_remaining_ms()
- Fixed
watchdog_get_time_remaining_ms()
to return milliseconds instead of microseconds
pico_aon_timer
- Fixed a bug in
aon_timer_get_time()
on RP2040 related to handling of Daylight Savings Time which meant that time could randomly be off by one hour
pico_async_context
- Fixed an incorrect assertion when using
pico_async_context_threadsafe_background
from both cores - Fixed a race condition in
async_context_execute_sync()
when usingpico_async_context_threadsafe_background
that might cause an assertion - Fixed a race condition in
async_context_deinit()
when usingpico_async_context_freertos
that might cause an assertion - Added support for FreeRTOS'
configSUPPORT_STATIC_ALLOCATION=1
when usingpico_async_context_freertos
pico_binary_info
- Fixed compilation when used by C++ code
pico_bootrom
- Add
rom_pick_ab_partition_during_update
function to provide a wrapper aroundrom_pick_ab_partition
, which is safe to call before callingrom_explicit_buy
during a Flash Update boot or TBYB boot. During development,rom_pick_ab_partition_during_update
was namedrom_pick_ab_update_partition
; backwards compatibility with this name isn't preserved
pico_bootsel_via_double_reset
- Fixed the implementation on RP2350
pico_btstack
- Added
CYBT_ERROR_ENABLED
,CYBT_INFO_ENABLED
,CYBT_DEBUG_ENABLED
for finer logging control - Fixed
btstack_cyw43_deinit()
to properly clean up the underlyingasync_context
via a newbtstack_run_loop_async_context_deinit()
method - Moved the default location for Bluetooth-related flash storage backwards one flash sector from the end of flash so that it no longer uses the last sector of flash, which can be overwritten by the workaround for erratum RP2350-E10
pico_clib_interface
- Added a default weak implementation of
_get_entropy()
inpico_newlib_interface
that returns -1 to avoid a linker warning. You can provide your own strong implementation if you wish to hook it up topico_rand
pico_crt0
- Added preprocessor defines that can be used for advanced control of the early application startup code:
- Added
PICO_CRT0_NEAR_CALLS
which, when set to 1, allows the saving of a handful of bytes if the calls made frompico_crt0
to the application (main
,runtime_init
etc.) are in a range <16M (e.g. from RAM->RAM or flash->flash) - Added
PICO_CRT0_NO_RESET_SECTION
to allow wholesale replacement of the.reset
section containing the earliest startup code, while keeping the vector table
- Added
- Added preprocessor defines that can be used for advanced control of the contents of the embedded
IMAGE_DEF
- Added
PICO_CRT0_INCLUDE_PICOBIN_VECTOR_TABLE_ITEM
if the user wants to override the default inclusion rules for theVECTOR_TABLE
item - Added
PICO_CRT0_INCLUDE_PICOBIN_ENTRY_POINT_ITEM
if the user wants to override the default inclusion rules for theENTRY_POINT
item
- Added
- Changed spacer sections (
.stack
and.heap
) to be allocatable by default. AddedPICO_CRT0_ALLOCATE_SPACERS
to control this
pico_cyw43_arch
- Enumerated possible error codes for
pico_cyw43_arch
methods in the documentation
pico_cyw43_driver
- Added new preprocessor define
PICO_CYW43_LOGGING_ENABLED
, which can be set to 0 to disable allcyw43-driver
logging even in debug builds - Upgraded lib/cyw43-driver to 1.1.0
- Note: this change has broken builds on GCC 6 and GCC 7 - please use a newer compiler version if you wish to use WiFi or Bluetooth
pico_lwip
- Upgraded lwIP to 2.2.1
pico_mbedtls
- Changed
makefsdata.py
slightly to allow it to recognize files that have been manually gzipped (e.g. "mysite.css.gz") and then send the proper Content-Encoding information in the response headers. - Upgraded Mbed TLS to 3.6.1
pico_multicore
- Fixed
multicore_lockout_
functions to be able to recover from a timeout situation (manifested as a problem withflash_safe_execute()
)
pico_runtime_init
- Renamed
PICO_RUNTIME_SKIP_POST_CLOCK_RESETS
define toPICO_RUNTIME_SKIP_INIT_POST_CLOCK_RESETS
which is consistent with all other similarPICO_RUNTIME_
defines. This is a backwards incompatible change if you happened to be using it
pico_stdio_usb
- Added the following preprocessor defines to improve the flexibility of using
pico_stdio_usb
alongside direct usage of TinyUSB device mode by the application:PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK
- whetherpico_stdio_usb
provides a background task to calltud_task()
PICO_STDIO_USB_ENABLE_TINYUSB_INIT
- whetherpico_stdio_usb
callstusb_init()
during initializationPICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS
- whetherpico_stdio_usb
is responsible for providing the CDC descriptors
- Added
stdio_usb_call_chars_available_callback()
to allow an application with direct usage of TinyUSB device mode, to call thestdio_chars_available_callback
in response to CDC events
pico_time
- Fixed
alarm_pool_destroy()
to "unclaim" the correct hardware alarm
pico_unique_id
- Moved runtime caching of the unique id earlier in the C library initialization process, so that it is available to C++ constructors.
- Added
PICO_UNIQUE_BOARD_ID_INIT_PRIORITY
to allow the user to control this further
Board Configuration
- Added
CYW43_WL_GPIO_SMPS_PIN
to complement the pre-existingCYW43_WL_GPIO_LED_PIN
andCYW43_WL_GPIO_VBUS_PIN
- Reworked the mechanism used to make the board configuration headers have side effects on CMake variables, since the use of comments caused confusion:
- Now prefer "pico_cmake_set(var, value)" over "// pico_cmake_set var = value"
- Now prefer "pico_cmake_set_default(var, value)" over "// pico_cmake_set_default var = value"
Host Build
- Added
pico_rand
library - Enabled
hardware_irq
stub library, which was present before but not available
Documentation
- Many miscellaneous improvements
- A new section for documentation on SDK CMake functions has been added to the C/C++ SDK book
- Many missing CMake variables and preprocessor defines have been added; these variables have been added to the C/C++ SDK book
- Add new section on Signing & Encrypting on RP2350 to the C/C++ SDK book
- Extended and fixed the list of web links in the API documentation
Pioasm
- Fixed C code generation for the
.mov_status irq set <n>
directive - Added
--version
option to print version information - Updated code generation to include the Pioasm version number as a comment in the generated files
Build
- GCC 15 is now supported
- Clang 20.1 is now supported
- Some changes were made to build more cleanly with C99
CMake Build
- Improved handling of BIN/UF2/DIS/HEX output files when using Ninja. Ninja provides added functionality over Make which allows these files to be properly "cleaned" and regenerated if deleted.
- The second argument of
pico_package_uf2_output
is now optional, and defaults to0x10000000
(the start of flash) - Added
pico_ensure_load_map
, which ensures thatpicotool seal
is invoked to add aLOAD_MAP
, even when not signing or hashing - Added
pico_check_linker_script()
, which is called to warn of possible incompatibilities with custom linker scripts - Fixed default build type specification via
PICO_DEFAULT_BINARY_TYPE
- Fixed location of
.map
for certain Ninja builds - Added support for creating self-decrypting binaries
- Added a warning when signing a binary with the provided "example" encryption keys
Bazel Build
- Updated Bazel to 8.1.0
- Allowed the user to disable adding of the default compiler flags
opt
,debug
andfastbuild
compilation modes, so the user can add their own. This is controlled by//bazel/config:PICO_COMPILATION_NO_OPT_ARGS
,//bazel/config:PICO_COMPILATION_NO_DEBUG_ARGS
,//bazel/config:PICO_COMPILATION_NO_FASTBUILD_ARGS
- Added
//bazel/config:PICO_TINYUSB_CONFIG
to allow the user to specify the location of their owntusb_config.h
New Examples
There are new examples in the pico_examples repository.
Example | Description |
---|---|
hello_encrypted | Create a self-decrypting binary, using the hardened decryption stage. This should be secure against side channel attacks. |
hello_encrypted_mbedtls | Create a self-decrypting binary, using the MbedTLS decryption stage. This is not secure against side channel attacks, so is fast but provides limited protection. |
uart_boot | A bootloader which boots a separate RP2350 using the UART boot interface. See section 5.8 in the datasheet for more details, including the wiring requirements |
partition_info | Extract and enumerate partition information (address ranges, permissions, IDs, and names) from the partition table |
hello_freertos_static_allocation | Demonstrates how to run FreeRTOS on two cores with static RAM allocation. |
picow_ota_update | A minimal OTA update server (RP235x Only). See the separate README for more details. |
status_blink | Blink the onboard LED using the status_led API. |
color_blink | Blink the onboard colored (WS2812) LED using the colored_status_led API if supported by the board |
Modified Examples
Example | Description |
---|---|
hello_freertos_one_core | Demonstrates how to run FreeRTOS and tasks on one core (previously called hello_freertos1 ) |
hello_freertos_two_cores | Demonstrates how to run FreeRTOS and tasks on two cores (previously called hello_freertos2 ). |
Authors
Alex Brudner,
Alexey Vazhnov,
Andrew Brock,
Andrew Scheller,
Armando Montanez,
BogDan Vatra,
Brad Nolan,
Caleb Jamison,
Christopher Chamberlain,
Damien George,
Dan Halbert,
David Dyck,
Dryw Wade,
eightycc,
el-bert0,
fadhil riyanto,
Goran Miskovic,
Graham Sanderson.
Jack Whitham,
Jeunese Payne,
Joel Murphy,
Luke Wren,
Marek Küthe,
Mark Hermeling
Markus Gyger,
Michael Brase,
Patrick Plenefisch,
Peter Harper,
Philip Howard,
rbryson74,
Scott Shawcroft,
Sergio R. Caprile,
SFE-Brudnerd,
sonodima,
Timo Kokkonen,
Tommy G,
William Vinnicombe,
UUGear