* Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing
- prefer "pico_cmake_set(var, value)" over "// pico_cmake_set var = value"
- prefer "pico_cmake_set_default(var, value)" over "// pico_cmake_set_default var = value"
- move these inside the header include guards as CLion complains
Note that the macros are defined in "pico.h" however that is not explicitly included by the board headers; this
will probably confuse some VS code syntax highligting, so lets see how it looks - i'd prefer to avoid having
to include a header just for this
* Update check_board_header.py with the new pico_cmake_set formats
* Add brackets back around `PICO_FLASH_SIZE_BYTES` settings
The python script checks for an exact match between the #define and the pico_cmake_set_default, so fails without the brackets
* Rename to pico_board_cmake_set and pico_board_cmake_set_default
* Fix support for old versions
---------
Co-authored-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
The workaround for errata RP2350-E10 overwrites the last block in flash.
This will overwrite the BT flash storage causing a paired BT connection
to fail. Move the default flash storage location to 3 sectors from the
end of flash for RP2350 where A2 support is required.
This will require existing BT pairings to a Pico device to be removed
and readded.
Fixes#2322
If you set the timezone, aon_timer_get_time can wrongly apply a
daylight saving time adjustment based on the stack contents. This can
make it appear that time has gone backwards.
Make sure datetime_to_tm initialises tm_isdst to -1.
Fixes#2374
* Update LwIP to 2.2.1
* Update to mbedtls to 3.6.1
* Update lib/cyw43-driver to 1.1.0
* Support using a more recent version of mbedtls
altcp_tls_mbedtls.c is not compatible with mbedtls 3.x so use a
patched version until this is resolved.
* Make sure MBEDTLS_VERSION_MAJOR is visible to LwIP.
* Test mbedtls in kitchen sink
* Add mbedtls to bazel
* Properly respect setting PICO_DEFAULT_BINARY_TYPE (rather than say PICO_NO_FLASH), and add a build error for specifying different types simulataneously
* remove dead code
* Add `PICO_MINIMAL_STORED_VECTOR_TABLE` config replacing (`PICO_NO_STORED_VECTOR_TABLE` which was a lie
* Add `PICO_NUM_VTABLE_IRQS`` which allows you to limit the number of IRQs included in both the STORED or RAM vector tables, and make the rest of the SDK behave properly based on that
* Because these new variables in `pico_crt0` are circularly dependent somewhat with variables in `hardware_irq` hoist all the interdependent variables into a new `pico_platform_common` which is common to all `rp2` platforms
* Move some previously duplicated `pico_platform` code into `pico_platform_common`
Net effect:
1. if you set PICO_MINIMAL_STORED_VECTOR_TABLE=1, you get a 4 word VTABLE on Arm.. you still get a RAM vector table with up to PICO_NUM_VTABLE_IRQs (defaults to NUM_IRQs) but everything - including things like `isr_pendsv` point to `__unhandled_user_irq`.
2. PICO_NUM_VTABLE_IRQs (default NUM_IRQS) sets the number of IRQs that have handlers in the VTABLE (this affects the space reserved, and what the irq APIs let you touch - at least as far as invalid_params_if!)
3. If you set PICO_MINIMAL_STORED_VECTOR_TABLE=1 for a no flash binary, then PICO_NUM_VTABLE_IRQs is forced to 0 as there is no reserved space for the handlers.
Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
* Add SPARE_IRQ to RP2350 SVD (note not having an `<addresBlock>` or one with a size of zero is not a legal SVD, so including something hopefully harmless
* Add SPARE_IRQ definitions to RP2040 intctrl.h, and add assertions on competing #defines as these were called USER_IRQs in the SDK 1.x
* Add SPAREIRQ_IRQ to rp2040 assembler, and fix name on rp2350 - this is backwards incompatible, but unlikely used
* add SPARE_IRQs to RP2040 svd too
When the user links in tinyUSB directly, the pico_stdio_usb library
disables some of its functionality, including its built-in background
processing thread. The user can implement their own background thread
in order to continue using the stdio functionality, except that there
is no wey to trigger the registered chars_available_callback. This
commit adds a new `stdio_usb_run_chars_available_callback()` method to
allow user's background threads to run the callback.
* Raise a warning when using the example signing/encryption keys
This is automatically disabled for pico-examples, and can be manually disabled by setting PICO_ALLOW_EXAMPLE_KEYS
This change adds the following to pico_stdio_usb:
- `PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK`
- `PICO_STDIO_USB_ENABLE_TINYUSB_INIT`
- `PICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS`
These defines replace some ifdefs that were previously gated by the
`LIB_TINYUSB_DEVICE` define and will allow finer grained control.
All of these defines default to 1 if LIB_TINYUSB_DEVICE is not defined
and 0 if LIB_TINYUSB_DEVICE is defined, which should preserve the
old behavior.
Observe that src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus_driver.c
wraps the definition of cybt_printf with #ifndef NDEBUG
Apply this to src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c
Co-authored-by: David Dyck <david.dyck@checksum.com>
This adds `//bazel/config:PICO_TINYUSB_CONFIG`, which is used to select
which tusb_config.h gets linked into the tinyUSB port. This defaults to
the tusb_config.h from the pico_stdio_usb (same as before), but allows
Bazel users to override this config with their own.