The platform.h headers for both RP2040 and RP2350 need 'extern "C"'
declarations when included from C++ code or 'rp2040_chip_version'
and 'rp2350_chip_version' won't be found by the linker.
* Release the lock in mbedtls_sha256_free if it was not released already. Requires making pico_sha256_unlock include-able. Fixes#2103.
* addres lock release API comment
* Fix description of pico_sha256_cleanup
---------
Co-authored-by: nils <nils@nils>
Co-authored-by: Peter Harper <peter.harper@raspberrypi.com>
We use a pio and dma to write to the cyw43 chip using spi. Normally you
write an address and then read the data from that address, so the pio
program does does a write then read.
If you just want to write data in the case of uploading firmware we
use the fdebug_tx_stall flag to work out if the pio has stalled waiting
to write more data.
The theory is that this flag will also get set if the bus is busy. So
we mistakenly think a write to cyw43 has completed.
Wait for the dma write to complete before waiting for the pio to stall.
Fixes#2206
* Remove deprecated uses of FetchContent_Populate
Cannot use MakeAvailable as the files shouldn't be added to the build, so instead uses the full signature for FetchContent_Populate
Fixes#2124
* Fix GIT_SUBMODULES_RECURSE for older CMake versions
* ta_set_timeout can fail to set an alarm
If alarm_pool_irq_handler takes <1us between handling an alarm and
calling ta_set_timeout then no alarms will be set as it will appear as
if an earlier alarm is already armedi before the target time.
Make sure ta_set_timeout always leaves with an alarm set by checking the
armed status.
Fixes#2118
* ta_disable_irq_handler should unarm its timer
* Move rom_data_lookup code into rom_data_lookup_inline
Allows ROM data lookup from FLASH/RAM sensitive code
* Use rom_data_lookup_inline in flash_devinfo_ptr
Fixes bug introduced by #2082 where flash_devinfo_get_cs_size would use rom_data_lookup from flash during a __no_inline_not_in_flash_func
pico-sdk/src/rp2_common/pico_flash/flash.c:155:33: warning: implicit declaration of function 'make_timeout_time_ms'
pico-sdk/src/rp2_common/pico_flash/flash.c:156:77: warning: implicit declaration of function 'time_reached'
* support both struct timespec and struct tm variants of the aon timer APIs since use of one type on RP2040 and the other on RP2350 require pulling in C library code. Provide weak pico_ wrappers for localtime_r and mktime so that the user can override the conversion functions
* Propogate non-default pico_cmake_set_default values through to compile definitions
Add PICO_BOARD_CMAKE_OVERRIDES common scope variable, to contain any pico_cmake_set_default
CMake variables which have been overwritten. This allows passing CMake arguments to the
build, without needing extra target_compile_definitions.
Also add pico_cmake_set_default PICO_RP2350_A2_SUPPORTED to enable/disable the E10 abs-block fix
* Fix more board files missing pico_cmake_set_default PICO_RP2350_A2_SUPPORTED
* Apply @lurch's patch to check_board_header.py
* Initial Pico 2 W Bazel support
Improves compatibility with Pico W and Pico 2 W by fixing issues that
prevented correct linking of wireless libraries.
* Improve correctness and configurability
* Require newer rules_python
* Require rules_python@0.36.0
* Fix missing compatibility expressions
* Minor tweaks
* Minor cleanup
* Update suggested version in Bazel README
* More README tweaks
* Improve Bazel btstack build correctness
* Save/restore QMI window 1 registers across calls to flash_exit_xip().
This works around the RP2350 ROM reinitialising window 1 even when it
does not actually issue an XIP exit sequence to that QSPI device. If no
exit sequence is issued, then the original configuration still applies.
This is not valid in the case where the ROM *does* issue an XIP exit
sequence to the second chip select, because the original mode is no
longer valid once the device is in the serial command state. The ROM
does this when FLASH_DEVINFO (loaded from OTP, stored in boot RAM) has a
nonzero size for chip select 1. To distinguish the two cases, this patch
adds getters/setters for FLASH_DEVINFO.
If chip select 1 has a nonzero size in FLASH_DEVINFO then the ROM's
register changes for window 1 are not reverted, and instead the
hardware_flash code makes additional changes to ensure writes also work
(as the ROM only reinitialises for reads).
This means that, in the case you have opted into ROM support for the
second chip select by setting a nonzero CS1 size in FLASH_DEVINFO, the
device on chip select 1 will continue to function correctly, but full
performance won't be restored until it is reinitialised. The best way to
handle this is initialising both chip select devices in your XIP setup
function (your boot2).
* Fix whitespace. Fix handling of PICO_FLASH_SIZE_BYTES == 0.