Skip to content

SDK version 1.2.0

Compare
Choose a tag to compare
@kilograham kilograham released this 03 Jun 15:54
· 441 commits to master since this release
bfcbefa

This release contains numerous bug fixes and documentation improvements. Additionally it contains the following improvements/notable changes:

Updated TinyUSB to 0.10.1

The lib/tinyusb submodule has been updated from 0.8.0 and now tracks upstream https://github.com/hathach/tinyusb.git. It is worth making sure you do a

git submodule sync
git submodule update

to make sure you are correctly tracking upstream TinyUSB if you are not checking out a clean pico-sdk repository.

Note also that moving ffrom TinyUSB 0.8.0 to TinyUSB 0.10.1 may require some minor changes to your USB code.

New/improved board headers

  • New board headers support for PICO_BOARDs arduino_nano_rp240_connect, pimoroni_picolipo_4mb and pimoroni_picolipo_16mb
  • Missing/new #defines for default SPI and I2C pins have been added

Added CMSIS core headers

CMSIS core headers (e.g. core_cm0plus.h and RP2040.h) are made available via cmsis_core INTERFACE library. Additionally, CMSIS standard exception naming is available via PICO_CMSIS_RENAME_EXCEPTIONS=1

API improvements

pico_sync

  • Added support for recursive mutexes via recursive_mutex_init() and auto_init_recursive_mutex()
  • Added mutex_enter_timeout_us()
  • Added critical_section_deinit()
  • Added sem_acquire_timeout_ms() and sem_acquire_block_until()

hardware_adc

  • Added adc_get_selected_input()

hardware_clocks

  • clock_get_hz() now returns actual achieved frequency rather than desired frequency

hardware_dma

  • Added dma_channel_is_claimed()
  • Added new methods for configuring/acknowledging DMA IRQs. dma_irqn_set_channel_enabled(), dma_irqn_set_channel_mask_enabled(), dma_irqn_get_channel_status(), dma_irqn_acknowledge_channel() etc.

hardware_exception

New library for setting ARM exception handlers:

  • Added exception_set_exclusive_handler(), exception_restore_handler(), exception_get_vtable_handler()

hardware_flash

  • Exposed previously private function flash_do_cmd() for low level flash command execution

hardware_gpio

  • Added gpio_set_input_hysteresis_enabled(), gpio_is_input_hysteresis_enabled(), gpio_set_slew_rate(), gpio_get_slew_rate(), gpio_set_drive_strength(), gpio_get_drive_strength(). gpio_get_out_level(), gpio_set_irqover()

hardware_i2c

  • Corrected a number of incorrect hardware register definitions
  • A number of edge case in the i2c code fixed

hardware_interp

  • Added interp_lane_is_claimed(), interp_unclaim_lane_mask()

hardware_irq

  • Notably fixed the PICO_LOWEST/HIGHEST_IRQ_PRIORITY values which were backwards!

hardware_pio

  • Added new methods for configuring/acknowledging PIO interrupts (pio_set_irqn_source_enabled(),
    pio_set_irqn_source_mask_enabled(), pio_interrupt_get(), pio_interrupt_clear() etc.)
  • Added pio_sm_is_claimed()

hardware_spi

  • Added spi_get_baudrate()
  • Changed spi_init() to return the set/achieved baud rate rather than void
  • Changed spi_is_writable() to return bool not size_t (it was always 1/0)

hardware_sync

  • Notable documentation improvements for spin lock functions
  • Added spin_lock_is_claimed()

hardware_timer

  • Added busy_wait_ms() to match busy_wait_us()
  • Added hardware_alarm_is_claimed()

pico_float/pico_double

  • Correctly save/restore divider state if floating point is used from interrupts

pico_int64_ops

  • Added PICO_INT64_OPS_IN_RAM flag to move code into RAM to avoid veneers when calling code is in RAM

pico_runtime

  • Added ability to override panic function by setting PICO_PANIC_FUNCTION=foo to the use foo as the implementation, or setting
    PICO_PANIC_FUNCITON= to simply breakpoint, saving some code space

pico_unique_id

  • Added pico_get_unique_board_id_string().

General code improvements

  • Cleanup up some additional classes of compiler warnings
  • Adding some missing const to method parameters

SVD

  • USB DPRAM for device mode is now included

pioasm

  • Added #pragma once to C/C++ output

RTOS interoperability

Improvements designed to make porting RTOSes either based on the SDK or supporting SDK code easier.

  • Added PICO_DIVIDER_DISABLE_INTERRUPTS flag to optionally configure all uses of the hardware divider to be guarded by disabling interrupts, rather than requiring on the RTOS to save/restore the divider state on context switch
  • Added new abstractions to pico/lock_core.h to allow an RTOS to inject replacement code for SDK based
    low level wait, notify and sleep/timeouts used by synchonization primitives in pico_sync and for sleep_ methods. If an RTOS implements these few simple methods, then all SDK semaphore, mutex, queue, sleep methods can be safely used both within/to/from RTOS tasks, but also to communicate with non RTOS task aware code, whether it be existing libraries and IRQ handlers or code running perhaps (though not necessarily) on the other core

CMake build changes

Substantive changes have been made to the CMake build, so if you are using a hand crafted non-CMake build, you will need to update your compile/link flags. Additionally changed some possibly confusing status messages from CMake build generation to be debug only

Boot Stage 2

  • New boot stage 2 for AT25SF128A