From 2062372d203b372849d573f252cf7c6dc2800c0a Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 1 Nov 2021 14:20:54 -0500 Subject: [PATCH 01/51] SDK 1.3.0 release See release notes for details Co-authored-by: Brian Cooke Co-authored-by: Luke Wren Co-authored-by: Uri Shaked Co-authored-by: Zapta Co-authored-by: Andrew Scheller Co-authored-by: Liam Fraser Co-authored-by: Gabriel Wang Co-authored-by: Matias Silva Co-authored-by: dp111 <19616418+dp111@users.noreply.github.com> Co-authored-by: Leonardo La Rocca <46094699+leoli51@users.noreply.github.com> Co-authored-by: Mahyar Koshkouei Co-authored-by: Brian Starkey Co-authored-by: Philip Howard Co-authored-by: Mike Causer Co-authored-by: Martino Facchin Co-authored-by: ZodiusInfuser Co-authored-by: Manuel Wick Co-authored-by: Matias Silva Co-authored-by: Robert Pafford <19439938+rjp5th@users.noreply.github.com> Co-authored-by: Alasdair Allan Co-authored-by: Engineer_Will <646689853@qq.com> Co-authored-by: Garatronic <31109090+garatronic@users.noreply.github.com> --- .github/pull_request_template.md | 4 + CMakeLists.txt | 2 - CONTRIBUTING.md | 25 + docs/DoxygenLayout.xml | 4 +- docs/header.html | 2 +- docs/weblinks_page.md | 4 +- lib/tinyusb | 2 +- pico_sdk_version.cmake | 3 +- src/CMakeLists.txt | 4 +- src/board_setup.cmake | 2 +- .../include/boards/adafruit_feather_rp2040.h | 10 +- .../boards/adafruit_itsybitsy_rp2040.h | 8 +- .../include/boards/adafruit_qtpy_rp2040.h | 8 +- .../include/boards/adafruit_trinkey_qt2040.h | 73 ++ .../boards/arduino_nano_rp2040_connect.h | 10 +- .../include/boards/melopero_shake_rp2040.h | 91 +++ src/boards/include/boards/pico.h | 8 +- .../include/boards/pimoroni_interstate75.h | 181 +++++ .../include/boards/pimoroni_keybow2040.h | 8 +- src/boards/include/boards/pimoroni_pga2040.h | 8 +- .../include/boards/pimoroni_picolipo_16mb.h | 8 +- .../include/boards/pimoroni_picolipo_4mb.h | 8 +- .../include/boards/pimoroni_picosystem.h | 8 +- .../include/boards/pimoroni_plasma2040.h | 137 ++++ src/boards/include/boards/pimoroni_tiny2040.h | 8 +- src/boards/include/boards/pybstick26_rp2040.h | 85 +++ src/boards/include/boards/sparkfun_micromod.h | 8 +- src/boards/include/boards/sparkfun_promicro.h | 8 +- .../include/boards/sparkfun_thingplus.h | 8 +- .../boards/waveshare_rp2040_lcd_0.96.h | 104 +++ .../boards/waveshare_rp2040_plus_16mb.h | 84 +++ .../boards/waveshare_rp2040_plus_4mb.h | 84 +++ .../include/boards/waveshare_rp2040_zero.h | 79 +++ src/common/CMakeLists.txt | 1 + src/common/pico_base/include/pico.h | 9 +- src/common/pico_base/include/pico/config.h | 2 +- src/common/pico_base/include/pico/error.h | 4 + src/common/pico_base/include/pico/types.h | 3 + src/common/pico_sync/include/pico/lock_core.h | 7 + src/common/pico_sync/include/pico/mutex.h | 191 ++++-- src/common/pico_sync/mutex.c | 157 +++-- src/common/pico_time/include/pico/time.h | 44 +- src/common/pico_time/time.c | 18 +- .../pico_usb_reset_interface/CMakeLists.txt | 2 + .../include/pico/usb_reset_interface.h | 28 + .../pico_util/include/pico/util/datetime.h | 7 + .../hardware_gpio/include/hardware/gpio.h | 2 + src/host/hardware_timer/timer.c | 6 +- .../pico_platform/include/pico/platform.h | 10 +- src/host/pico_stdio/include/pico/stdio.h | 3 + .../include/hardware/platform_defs.h | 22 +- .../hardware_regs/include/hardware/regs/dma.h | 312 ++++----- .../hardware_regs/include/hardware/regs/i2c.h | 74 ++ .../hardware_regs/include/hardware/regs/pio.h | 6 +- .../hardware_regs/include/hardware/regs/sio.h | 88 +-- .../hardware_regs/include/hardware/regs/usb.h | 14 +- .../include/hardware/regs/usb_device_dpram.h | 64 +- .../include/hardware/regs/xosc.h | 11 +- src/rp2040/hardware_regs/rp2040.svd | 642 ++++++++++-------- .../include/hardware/structs/adc.h | 77 ++- .../include/hardware/structs/bus_ctrl.h | 43 +- .../include/hardware/structs/clocks.h | 278 +++++++- .../include/hardware/structs/dma.h | 161 ++++- .../include/hardware/structs/i2c.h | 385 ++++++++--- .../include/hardware/structs/interp.h | 58 +- .../include/hardware/structs/iobank0.h | 197 +++++- .../include/hardware/structs/ioqspi.h | 163 ++++- .../include/hardware/structs/mpu.h | 40 +- .../include/hardware/structs/pads_qspi.h | 32 +- .../include/hardware/structs/padsbank0.h | 34 +- .../include/hardware/structs/pio.h | 270 +++++++- .../include/hardware/structs/pll.h | 33 +- .../include/hardware/structs/psm.h | 94 ++- .../include/hardware/structs/pwm.h | 101 ++- .../include/hardware/structs/resets.h | 98 ++- .../include/hardware/structs/rosc.h | 65 +- .../include/hardware/structs/rtc.h | 95 ++- .../include/hardware/structs/scb.h | 51 +- .../include/hardware/structs/sio.h | 131 +++- .../include/hardware/structs/spi.h | 79 ++- .../include/hardware/structs/ssi.h | 193 +++++- .../include/hardware/structs/syscfg.h | 55 +- .../include/hardware/structs/systick.h | 32 +- .../include/hardware/structs/timer.h | 80 ++- .../include/hardware/structs/uart.h | 150 +++- .../include/hardware/structs/usb.h | 455 ++++++++++++- .../hardware/structs/vreg_and_chip_reset.h | 31 +- .../include/hardware/structs/watchdog.h | 42 +- .../include/hardware/structs/xip_ctrl.h | 57 +- .../include/hardware/structs/xosc.h | 39 +- src/rp2_common.cmake | 12 +- src/rp2_common/CMakeLists.txt | 1 + src/rp2_common/boot_stage2/CMakeLists.txt | 9 +- .../hardware_adc/include/hardware/adc.h | 12 +- .../include/hardware/address_mapped.h | 40 +- src/rp2_common/hardware_dma/dma.c | 20 + .../hardware_dma/include/hardware/dma.h | 69 ++ .../include/hardware/exception.h | 6 +- src/rp2_common/hardware_flash/flash.c | 26 +- src/rp2_common/hardware_gpio/gpio.c | 2 +- .../hardware_gpio/include/hardware/gpio.h | 10 +- src/rp2_common/hardware_i2c/i2c.c | 14 +- .../hardware_i2c/include/hardware/i2c.h | 34 +- .../hardware_irq/include/hardware/irq.h | 33 +- src/rp2_common/hardware_irq/irq.c | 51 +- .../hardware_irq/irq_handler_chain.S | 2 +- .../hardware_pio/include/hardware/pio.h | 11 +- .../include/hardware/pio_instructions.h | 357 +++++++++- .../hardware_pwm/include/hardware/pwm.h | 61 +- .../hardware_spi/include/hardware/spi.h | 14 + .../hardware_uart/include/hardware/uart.h | 27 +- .../include/hardware/watchdog.h | 29 +- src/rp2_common/hardware_watchdog/watchdog.c | 31 +- src/rp2_common/hardware_xosc/xosc.c | 4 +- src/rp2_common/pico_bit_ops/bit_ops_aeabi.S | 10 +- src/rp2_common/pico_bootrom/bootrom.c | 4 +- .../pico_bootrom/include/pico/bootrom.h | 78 ++- .../pico_bootsel_via_double_reset.c | 3 +- src/rp2_common/pico_divider/CMakeLists.txt | 1 + src/rp2_common/pico_divider/divider.S | 2 + src/rp2_common/pico_double/double_aeabi.S | 8 +- src/rp2_common/pico_double/double_init_rom.c | 8 +- src/rp2_common/pico_double/double_math.c | 77 ++- .../pico_double/double_v1_rom_shim.S | 18 +- .../rp2040_usb_device_enumeration.c | 25 +- src/rp2_common/pico_float/float_aeabi.S | 10 +- src/rp2_common/pico_float/float_init_rom.c | 8 +- src/rp2_common/pico_float/float_math.c | 77 ++- src/rp2_common/pico_float/float_v1_rom_shim.S | 2 +- src/rp2_common/pico_mem_ops/mem_ops_aeabi.S | 25 +- .../pico_multicore/include/pico/multicore.h | 185 ++++- src/rp2_common/pico_multicore/multicore.c | 24 +- .../pico_platform/include/pico/asm_helper.S | 8 +- .../pico_platform/include/pico/platform.h | 331 +++++++-- src/rp2_common/pico_runtime/runtime.c | 38 +- .../pico_standard_link/CMakeLists.txt | 4 + src/rp2_common/pico_standard_link/crt0.S | 3 +- .../pico_stdio/include/pico/stdio.h | 15 +- src/rp2_common/pico_stdio/stdio.c | 37 +- .../stdio_semihosting.c | 6 +- src/rp2_common/pico_stdio_usb/CMakeLists.txt | 1 + .../pico_stdio_usb/include/pico/stdio_usb.h | 24 +- .../include/pico/stdio_usb/reset_interface.h | 14 +- .../pico_stdio_usb/reset_interface.c | 2 +- src/rp2_common/pico_stdio_usb/stdio_usb.c | 26 +- .../pico_stdio_usb/stdio_usb_descriptors.c | 2 +- .../pico_unique_id/include/pico/unique_id.h | 2 + src/rp2_common/tinyusb/CMakeLists.txt | 5 +- test/kitchen_sink/CMakeLists.txt | 9 +- test/kitchen_sink/kitchen_sink.c | 37 +- .../pico_divider_nesting_test.c | 17 + tools/CMakeLists.txt | 8 +- tools/elf2uf2/main.cpp | 3 + tools/pioasm/gen/parser.cpp | 18 +- tools/pioasm/main.cpp | 4 +- tools/pioasm/parser.yy | 2 +- tools/pioasm/pio_assembler.cpp | 2 +- tools/pioasm/python_output.cpp | 24 +- 158 files changed, 7078 insertions(+), 1436 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md create mode 100644 src/boards/include/boards/adafruit_trinkey_qt2040.h create mode 100644 src/boards/include/boards/melopero_shake_rp2040.h create mode 100644 src/boards/include/boards/pimoroni_interstate75.h create mode 100644 src/boards/include/boards/pimoroni_plasma2040.h create mode 100644 src/boards/include/boards/pybstick26_rp2040.h create mode 100644 src/boards/include/boards/waveshare_rp2040_lcd_0.96.h create mode 100644 src/boards/include/boards/waveshare_rp2040_plus_16mb.h create mode 100644 src/boards/include/boards/waveshare_rp2040_plus_4mb.h create mode 100644 src/boards/include/boards/waveshare_rp2040_zero.h create mode 100644 src/common/pico_usb_reset_interface/CMakeLists.txt create mode 100644 src/common/pico_usb_reset_interface/include/pico/usb_reset_interface.h diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..e3617774b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,4 @@ +_Instructions: (please delete)_ + - _please do not submit against `master`, use `develop` instead_ + - _please make sure there is an associated issue for your PR, and reference it via "Fixes #num" in the description_ + - _please enter a detailed description_ diff --git a/CMakeLists.txt b/CMakeLists.txt index c270649c2..0ab4c317d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,8 +33,6 @@ if (NOT TARGET _pico_sdk_inclusion_marker) add_subdirectory(tools) add_subdirectory(src) - add_compile_options(-Winline) - # allow customization add_sub_list_dirs(PICO_SDK_POST_LIST_DIRS) add_sub_list_files(PICO_SDK_POST_LIST_FILES) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..dc69b2611 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing to Raspberry Pi Pico C/C++ SDK + +## How to Report a Bug + +We use GitHub to host code, track [issues](https://github.com/raspberrypi/pico-sdk/issues) and feature requests, and to accept [pull requests](https://github.com/raspberrypi/pico-sdk/pulls). If you find think you have found a bug in the SDK please report it by [opening a new issue](https://github.com/raspberrypi/pico-sdk/issues/new). Please include as much detail as possible, and ideally some code to reproduce the problem. + +## How to Contribute Code + +In order to contribute new or updated code, you must first create a GitHub account and fork the original repository to your own account. You can make changes, save them in your repository, then [make a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) against this repository. The pull request will appear [in the repository](https://github.com/raspberrypi/pico-sdk/pulls) where it can be assessed by the maintainers, and if appropriate, merged with the official repository. + +**NOTE:** Development takes place on the `develop` branch in this repository. Please open your https://github.com/raspberrypi/pico-sdk/pulls[pull request] (PR) against the [`develop`](https://github.com/raspberrypi/pico-sdk/tree/develop) branch, pull requests against the `master` branch will automatically CI fail checks and will not be accepted. You will be asked to rebase your PR against `develop` and if you do not do so, your PR will be closed. + +While we are happy to take contributions, big or small, changes in the SDK may have knock-on effects in other places so it is possible that apparently benign pull requests that make seemingly small changes could be refused. + +### Code Style + +If you are contributing new or updated code please match the existing code style, particularly: + +* Use 4 spaces for indentation rather than tabs. +* Braces are required for everything except single line `if` statements. +* Opening braces should not be placed on a new line. + +### Licensing + +Code in this repository is lisensed under the [BSD-3 License](LICENSE.TXT). By contributing content to this repository you are agreeing to place your contributions under this licence. diff --git a/docs/DoxygenLayout.xml b/docs/DoxygenLayout.xml index e0fd3960a..6ba5dfcd6 100644 --- a/docs/DoxygenLayout.xml +++ b/docs/DoxygenLayout.xml @@ -15,9 +15,9 @@ - + - + diff --git a/docs/header.html b/docs/header.html index da3cd81a2..32bb7eb7e 100644 --- a/docs/header.html +++ b/docs/header.html @@ -54,7 +54,7 @@