This release contains new libraries and functionality, along with numerous bug fixes and documentation improvements.
Note, these release notes are long and may appear truncated in the “Releases” tab; you can see the full version here.
New Board Support
The following boards have been added and may be specified via
clock_gpio_init()now takes a
floatfor the clock divider value, rather than an
clock_gpio_init_int_frac()function to allow initialization of integer and fractional part of the clock divider value, without using
vocalc.pyto override the minimum reference frequency allowed.
vocalc.pynow additionally considers reference frequency dividers greater than 1.
- Improved the performance of
dma_sniffer_set_output_reverse_enabled()functions to configure the DMA sniffer.
dma_sniffer_get_data_accumulator()functions to access the DMA sniffer accumulator.
i2c_get_instance()function for consistency with other
i2c_write_byte_raw()functions to directly read and write the I2C data register for an I2C instance.
hardware_alarm_claim_unused()function to claim an unused hardware timer.
cyw43_arch_wifi_connect_functions to allow connection to a specific access point.
cyw43_arch_wifi_connect_functions now continue trying to connect rather than failing immediately if the network is not found.
cyw43_arch_wifi_connect_functions now return consistent return codes (
pico_cyw43_archlibrary has been completely rewritten on top of the new
pico_async_contextlibrary that generically abstracts the different types of asynchronous operation (
freertos) previously handled in a bespoke fashion by
pico_cyw43_arch. Many edge case bugs have been fixed as a result of this. Note that this change should be entirely backwards compatible from the user point of view.
cyw43_arch_deinit()functions are now very thin layers which handle
async_contextlife-cycles, along with adding support for the
pico_lwipetc. to that
async_context. Currently, these mechanisms remain the preferred documented way to initialize Pico W networking, however you are free to do similar initialization/de-initialization yourself.
cyw43_arch_set_async_context()function to specify a custom
async_contextprior to calling
cyw43_arch_async_context()function to get the
async_contextused by the CYW43 architecture support.
cyw43_arch_init_default_async_context()function to return the
cyw43_arch_init*()would initialize if one has not been set by the user.
cyw43_arch_wait_for_work_until()function to block until there is networking work to be done. This is most useful for
pollstyle applications that have no other work to do and wish to sleep until
cyw43_arch_poll()needs to be called again.
- The functionality has been clarified into 3 separate libraries:
cyw43_driver– the raw cyw43_driver code.
cyw43_driver_picow– additional support for communication with the Wi-Fi chip over SPI on Pico W.
pico_cyw43_driver– integration of the cyw43_driver with the
CYW43_WIFI_NVRAM_INCLUDE_FILEdefine to allow user to override the NVRAM file.
- Improved the performance of 64-bit divider functions.
panic_compact()function that discards the message to save space in non-debug (
- Added proper implementation of certain missing
- The above changes enable certain additional C/C++ library functionality such as
settimeofday()implementation such that
gettimeofday()can be meaningfully used.
- Added default (return
-1) implementations of the remaining
_kill(), to prevent warnings on GCC 12.
- Made all
newlibsystem API implementations weak so the user can override them.
pico_stdioallows for outputting from within an IRQ handler that creates the potential for deadlocks (especially with
pico_stdio_usb), and the intention is to not deadlock but instead discard output in any cases where a deadlock would otherwise occur. The code has been revamped to avoid more deadlock cases, and a new define
PICO_STDIO_DEADLOCK_TIMEOUT_MShas been added to catch remaining cases that might be caused by user level locking.
stdio_set_chars_available_callback()function to set a callback to be called when input is available. See also the new
PICO_STDIO_UART_SUPPORT_CHARS_AVAILABLE_CALLBACKdefines which both default to
1and control the availability of this new feature for USB and UART stdio respectively (at the cost of a little more code).
- Improved performance of
- Give the user more control over the USB descriptors of
critical_section_is_initialized()function to test if a critical section has been initialized.
mutex_try_enter_block_until()function to wait only up to a certain time to acquire a mutex.
from_us_since_boot()function to convert a
uint64_ttimestamp to an
absolute_time_min()function to return the earlier of two
alarm_pool_create_with_unused_hardware_alarm()function to create an alarm pool using a hardware alarm number claimed using
alarm_pool_core_num()function to determine what core an alarm pool runs on.
alarm_pool_add_alarm_at_force_in_context()function to add an alarm, and have it always run in the IRQ context even if the target time is in the past, or during the call. This may be simpler in some cases than dealing with the
fire_if_pastparameters to existing functions, and avoids some callbacks happening from non IRQ context.
pico_lwip_mqttlibrary to expose the MQTT app functionality in lwIP.
pico_lwip_mdnslibrary to expose the MDNS app functionality in lwIP.
NO_SYS=0with FreeRTOS as a complement to
- TinyUSB has upgraded from 0.12.0 to 0.15.0. See TinyUSB release notes here for details.
- Particularly host support should be massively improved.
- Defaulted new
1as a workaround for errata RP2040-E15.This sets the default value for TinyUSB’s
TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIXflag. This fix is required for correctness, but comes at the cost of some performance, so applications that won’t ever be plugged into a Pi 4 or Pi 400 can optionally disable this by setting the value to
- Provides support for asynchronous events (timers/IRQ notifications) to be handled in a safe context without concurrent execution (as required by many asynchronous 3rd party libraries).
- Provides implementations matching those previously implemented in
poll– Not thread-safe; the user must call
async_context_poll()periodically from their main loop, but can call
async_context_wait_for_work_until()to block until work is required.
threadsafe_background– No polling is required; instead asynchronous work is performed in a low priority IRQ. Locking is provided such that IRQ/non-IRQ or multiple cores can interact safely.
freertos– Asynchronous work is performed in a separate FreeRTOS task.
async_contextguarantees all callbacks happen on a single core.
async_contextsupports multiple instances for providing independent context which can execute concurrently with respect to each other.
- A (slightly modified) pico_i2c_slave library from https://github.com/vmilea/pico_i2c_slave
- Adds a callback style event API for handling I2C slave requests.
pico_mbedtlslibrary to provide MBed TLS support. You can depend on both
pico_mbedtlsto use MBed TLS and lwIP together. See the tls_client example in
pico-examplesfor more details.
- Implements a new Random Number Generator API.
pico_randgenerates random numbers at runtime utilizing a number of possible entropy, and uses those sources to modify the state of a 128-bit ‘Pseudo Random Number Generator’ implemented in software.
get_rand_128()functions to return largely unpredictable random numbers (which should be different on each board/run for example).
- Added a new header
hardware/structs/nvic.hwith a struct for the Arm Cortex M0+ NVIC available via the
- Added new
PICO_CXX_DISABLE_ALLOCATION_OVERRIDESwhich can be set to
1if you do not want
pico_standard_linkto include non-exceptional overrides of
std::deletewhen exceptions are disabled.
elf2uf2now correctly uses
VMAof the entry point to determine binary type (flash/RAM). This is required to support some exotic binaries correctly.
- The build will now check for a functional compiler via the standard
- The build will pick up pre-installed
pioasmif found via an installed
CMakepackage. If it can do so, then no native compiler is required for the build!
- It is now possible to switch the board type
PICO_BOARDin an existing
ARCHIVE_OUTPUT_DIRECTORYis now respected in build for
- Spaces are now supported in the path to the
- All libraries
pico-sdknow support a
xxx_headersvariant that just pulls in the libraries’ headers. These
xxx_headerslibraries correctly mirror the dependencies of the
xxxlibraries, so you can use
xxxas your dependency if you do not want to pull in any implementation files (perhaps if you are making a
STATIClibrary). Actually the “all” is not quite true, non code libraries such as
pico_cxx_optionsare an exception.
Bluetooth Support for Pico W (BETA)
The support is currently available as a beta. More details will be forthcoming with the actual release.
In the meantime, there are examples in pico-examples.
- The Bluetooth API is provided by BTstack.
- The following new libraries are provided that expose core BTstack functionality:
pico_btstack_ble– Adds Bluetooth Low Energy (LE) support.
pico_btstack_classic– Adds Bluetooth Classic support.
pico_btstack_sbc_encoder– Adds Bluetooth Sub Band Coding (SBC) encoder support.
pico_btstack_sbc_decoder– Adds Bluetooth Sub Band Coding (SBC) decoder support.
pico_btstack_bnep_lwip– Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP.
pico_btstack_bnep_lwip_sys_freertos– Adds Bluetooth Network Encapsulation Protocol (BNEP) support using LwIP with FreeRTOS for
- The following integration libraries are also provided:
pico_btstack_run_loop_async_context– provides a common
async_contextbacked implementation of a BTstack “run loop” that can be used for all BTstack use with the
pico_btsack_flash_bank– provides a sample implementation for storing required Bluetooth state in flash.
pico_btstack_cyw43– integrates BTstack with the CYW43 driver.
pico_btstack_make_gatt_headerthat can be used to run the BTstack
compile_gatttool to make a GATT header file from a BTstack
cyw43_driverto support HCI communication for Bluetooth.
cyw43_driver_picowto support Pico W specific HCI communication for Bluetooth over SPI.
cyw43_arch_deinit()to additionally handle Bluetooth support if
1(as it will be automatically if you depend on
Thanks to the following for their contributions:
Earle F. Philhower, III,
Jonathan Reichelt Gjertsen,
Mr. Green’s Workshop,