* Add @pico-sdk prefix to bazel/config in lwip.BUILD
Without this, we're trying to refer to a subpackage of
the lwip directory called bazel/config, which doesn't
exist. See similar references in this file.
* bazelbuild: Fix compilation errors with pico_lwip and freertos
This fixes two general problems.
* pico_lwip_contrib_freertos misspelled several things
(omitted contrib/ dir prefix, didn't have @pico-sdk in front of
out references to pico-sdk targets)
This is fixed simply by fixing the spellings.
* Circular dependency between pico_lwip_core and pico_lwip_contrib_freertos.
In NO_SYS=0 mode, lwip wants to include sys_arch.h. But sys_arch.h
is defined in pico_lwip_contrib_freertos. sys_arch.c in turn wants
to include lwip's opt.h and arch.h, among other things. So it needs
to depend on pico_lwip_core.
This is fixed by extracting all the headers into a common rule which
can be depended on by both targets, then depending on it in the
relevant targets.
Additionally, for the LWIP+FreeRTOS build to work correctly, we need
to actually depend on the pico_lwip_contrib_freertos rule from
pico_lwip_core. This the purpose of the select in the deps of
pico_lwip_core.
* bazel+cyw43: Fix compilation errors.
This fixes issues with the cyw43 driver
build rules in Bazel:
* Before this, the btstack would always be included
even if it could not be used. If the user did not
specify a btstack config, this would cause a
compilation error. Now, we condition the linking
and building of the btstack on whether there is
a config for it.
* Before, the btbus was not properly linked.
* Implements code review feedback
I was reading through my PDF copy of the SDK docs, and I think that there's a typo in this example. The macro is `__time_critical_func` but the example spells it `__time_critical`.
* Modify check_board_header.py to work with both RP2040- and RP2350-based boards
* Tweaks to the board-header files so that they pass check_board_header.py
* Update tools/check_board_header.py
so that it handles pico_cmake_set_default the same way as cmake/generic_board.cmake does
* Support serial flash with 16 byte unique id
Flash devices like IS25LP016D have a 16 byte unique id. Reading just the
first 8 bytes causes devices to have duplicate unique ids as the numbers
only differ in the final 8 bytes.
Support overriding FLASH_UNIQUE_ID_SIZE_BYTES in the board header. Use
the final 8 bytes for the unique id.
Fixes#1641
Always write the path as "abosolute" (relative to the root of pico-sdk) as that makes searching for it (when building the RP2040 datasheet) much faster. This matches the behaviour of extract_build_defines.py and extract_cmake_configs.py
* Small whitespace fixup
* typo bugfix
* Small refactoring of check_board_header.py
* Make structure of rp2040_interface_pins.json more explicit, so that it can be more easily extended
* Move definition of valid-pins from python to json
* Check that each interface includes all (minimally) expected pins
Note that UART_CTS, UART_RTS & SPI_CSN are classed as optional
* Split "expected_functions" into "required" (all of these pins must be present) and "one_of" (at least one of these pins must be present)
Without this change, using cyw43 has a dependency on printf code for printing
error message. Everywhere else in cyw43-code this dependency is masked with the
CYW43_PRINTF-macro. This PR extends the usage of the CYW43-PRINTF macro to the
SPI-support code.
* Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags
Setting CMAKE_${LANG}_FLAGS_DEBUG_INIT specifically only sets the flags for the Debug config the first time it is configured by CMake, pulling the initially-configured flags from CMakeCache.txt on subsequent configurations. This causes PICO_DEOPTIMIZED_DEBUG to not have any effect after the initial configuration, causing breakpoint issues when debugging certain functions.
Clearing the cache of the debug flags allows the flags to be updated every configuration, and appended to appropriately (such as with "-g").
See Issue #1618 and the comments of Pull Request #1620 for further details.
Fixes#1618