Ensures the async worker is unregistered from the context before releasing the
blocking thread. This prevents the `sync_func_call_t` stack object from being
accessed after it goes out of scope, avoiding a use-after-return condition
in multicore `async_context_execute_sync()` scenarios.
Fixesraspberrypi/pico-sdk#2433
Signed-off-by: Goran Mišković <schkovich@users.noreply.github.com>
* Don't include the picobin end block when signing, as picotool will add a new end block anyway
* small whitespace fix
---------
Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
This raises a warning with recent CMake versions, and isn't required due to the `pico_add_link_depend` already added for these files
Fixesraspberrypi/picotool#235
* Call enable_interrupts when initialising IRQs
Fixesraspberrypi/pico-examples#584, supercedes raspberrypi/pico-examples#588
* move enable_interrupts to the end though it doesn't make much difference
* guard enable_interrupts by !RP2040 as it isn't needed there
---------
Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
* Fix issue 2454 flash safe execute lockout
The lockout state is controlled by a shared variable. The FIFO
is used to begin a lockout and acknowledge it (i.e.
multicore_lockout_handshake works as before) but the end
of the lockout is now signalled by updating the shared variable.
This ensures that timeouts are recognised reliably by the victim core.
__wfe and __sev are used to signal updates to the shared variable
in order to avoid polling.
* Update documentation for multicore_lockout_end functions
* Simplification, remove magic number (not required)
* Review improvements
* Restore use of non-zero magic number
* Add support for wiznet_w5100s_evb_pico2
This board has an RP2350 and a smaller 2MB flash
Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
* update to new syntax
Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
* fix missing definition
Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
---------
Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
* Minor fixups to compile with TF-M
TF-M requires c99 compatibility, which throws errors at these lines
This patch fixes those errors and is currently applied by TF-M when cloning the SDK, but it would be better to get it into the SDK by default so that patch isn't needed
* #ifdef only on __STRICT_ANSI__
Also fix devinfo type
This prints out the location of the picotool executable being used
For example:
* `Using picotool from /usr/local/bin/picotool` for a system install
* `Using picotool from /home/name/pico-examples/build/_deps/picotool/picotool` for a picotool fetched by the SDK
Since cyw43_spi_reset() may be executed from an async context, we
should use cyw43_delay_ms() instead of sleep_ms(). This is particularly
a problem when using the async_context_threadsafe_background backend,
because sleep_ms() will assert in an ISR.
The mbedtls methods have dropped the "_ret" from the function names in
mbedtls 3.x. Use the new function names but support the old names if
mbedtls 2.x is used.
You can deinitialise cyw43 and btstack by calling btstack_cyw43_deinit
but its pending and timeout workers are not removed which means they can
keep running, whcih causes a crash.
Add a btstack_run_loop_async_context_deinit method and call this from
btstack_cyw43_deinit.
* 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