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
If you call rtc_get_datetime immediately after rtc_set_datetime you get
junk back. According to the datasheet "Writing to the RTC will take
2 clk_rtc clock periods to arrive". So add a delay after calling
rtc_set_datetime in aon_timer_set_time_calendar.
Fixes#2148
* on RP2350 _dcp variant now enables -msoft-float, since if you're using this at all it is likely because you don't want to use the VFP unit at all (to save stack space)
* implement all float_ and double_ conversion functions in all pico_float_pico_ variants and pico_double_pico on RP2040 and RP2350 (many were missing in some combinations)
* provide better granularity of what functions are wrapped in each case
also marked custom_xxx_funcs_test.c as not in bazel build yet
* 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
* 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
* Add XIP cache maintenance API (fixes#2005)
Also add a cache clean to hardware_flash implementations, to avoid
losing pending writes on the subsequent invalidate.
* Fix comment typos, add to docs index, remove unnecessary defaulting of XIP_CACHE assertions on FLASH
* Fix sense of unsigned wrapping test
* update bazel build
---------
Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
* Fix Bazel build breakages
* Adds support for new PICO_DEFAULT_UART_BAUD_RATE option.
* Fixes issues related to Picotool and boot_picoboot_headers.
* Adds pico_float RISC-V pieces to the Bazel build (not yet fully
tested).
* Adds the missing adafruit board header to the Bazel build.
* Exclude hazard3 float test in Bazel validation script
* Restore missing dependency in hardware_boot_lock
* Add fast single-precision add/sub/mul for Hazard3
* Make test output less noisy. Map -nan to -inf in vector gen. Move random vectors to separate files.
* Re-disable USB stdout for pico_float_test by default...
* Disable pico/float.h exports on RISC-V as these functions aren't implemented
* Add hazard3 instructions to asm_helper. Split hazard3.h to support this.
You can still include hazard3.h to get everything. This just allows you
to pull in less.
* Add host Bazel build
Updates target_compatible_with across the repo to ensure that wildcard
builds for both host and rp2040 succeed.
* Get unit tests building
* Add Python script to identify build system differences
Uses the build system tags to make it easier to identify differences
between the CMake and Bazel builds.
* Temporarily disable pico divider test
* Support PICO_BARE_METAL in Bazel
* Support PICO_NO_GC_SECTIONS in Bazel
* Support boot2 configuration in Bazel
Adds support for PICO_DEFAULT_BOOT_STAGE2 and
PICO_DEFAULT_BOOT_STAGE2_FILE in the Bazel build.
* Allowlist some CMake-only options
* Support CXX configuration options in Bazel
* Move multiple_choice_flag.bzl
* Support all pico boards
* Support linking multiple stdio implementations
Changes the Bazel build so stdio implementations are no longer mutually
exclusive.
* Add PICO_BOOT_STAGE2_LINK_IMAGE
* Support PICO_CMSIS_PATH in Bazel
* Support PICO_USE_DEFAULT_MAX_PAGE_SIZE in Bazel
* Silence PICO_CMSIS_VENDOR and PICO_CMSIS_DEVICE differences
* Support PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS in Bazel
* Properly support version defines
* Support embedding binary info in Bazel
* Embed build type in binary
* Support different linker scripts in Bazel build
* Finish out missing PICO_BUILD_DEFINE in Bazel build
* Support PICO_NO_TARGET_NAME
* Reorganize initial configuration options in Bazel
Cleans up and reorganizes some of the initial configuration options
added to the Bazel build so everything is consistent.
* Add builds for pioasm and elf2uf2
* Use Python rules from rules_python
* Actually link in output formats in pioasm tool
* Make tools have public visibility
* Add UF2 Bazel aspect
* Add TODOs for pioasm/uf2 helpers
* Fix compile flag typo
* Update Bazel SDK configuration strings to match recent CMake changes
* Fix pico_divider test
* Clean up straggling TODOs
* Clarify pico_stdio_test compatibility
* Initial Bazel Pico W support
* Add new files from develop
* Clean up compatibility expressions in Bazel build
* Clean up rp2 constraint handling in Bazel
* More Bazel docs cleanup
* Format Bazel build files
* Consolidate transitions in the Pico SDK
* Make every _allowlist_function_transition explicit
* More docs cleanup
* Add a few missing defines
* Improve PICO_CONFIG_HEADER correctness in Bazel
* Minor docs clarifications
* Add new pico_flash library, with flash_safe_execute(func) method to help with preventing IRQs and other core accessing flash with pico_multicore or FreeRTOS SMP
* switch all .S files to unified asm, and use a new macro `pico_default_asm_setup` to setup compiler to help porting to other compilers. Also some minor tweaks:
* switch some code to use more recent helper methods (e.g. busy_wait_at_least_n_cycles)
* add documentation to host divider header (I had this ages ago and never promoted)
* fixup erroneous docs about 32p32 values in all divider headers
* fix some compiler warnings
* rename recently added `unified_asm` macro to `pico_default_asm`
* Fix various non-GCC warnings (no effect on GCC)
* Reduce use of typeof since non GCC compilers may not support it
* Introduce PICO_C_COMPILER_IS_GNU, PICO_C_COMPILER_IS_CLANG, PICO_C_COMPILER_IS_IAR to CMake as if (CMAKE_C_COMPILER_ID STREQUAL "xxx") is a bit verbose
* Use "unified_asm" macro for all inline asm (it is "volatile __asm" on GNU with a .syntex unified)
* Use NOLOAD instead of COPY in linker scripts (arguably more correct anyway)
* Use the same style for setting _etext in all 4 linker scripts (to the beginning of .data). Clang aligns .data on a 16 byte boundary. Note ideally we'd
add a new symbol __data_source, however that would break backwards compatibility with existing user linker scripts
* Use "a" for .stack, .heap sections because clang complains otherwise, and they are explicitly NOLOAD anyway
* Avoid duplicating __sev, __wfe, __wfi which Clang sometimes seems to provide as built-ins
* Add missing kitchen_sink_blocked_ram binary
* Allow build with LLVM Embedded Toolchain Form ARM v 14.0.0 (unsupported atm)
* * Harden stdio_usb and stdio in general against deadlocks which could otherwise result from doing printfs from within IRQs
* Add a test for the above
* Add mutex_try_enter_block_until API.
* Make best_effort_wfe_or_timeout not use alarms if called from within IRQ
Add a general purpose random number generator via pico_rand library. which tries to use as much real entropy as possible mixed into a PRNG
Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
* Add mbedtls as a submodule
Checked out on branch mbedtls-2.28
* Add mbedtls to pico-sdk
Link your code to pico_lwip_mbedtls and pico_mbedtls.
See tls_client example in pico-examples
Fixes https://github.com/raspberrypi/pico-sdk/issues/893
* fix __force_inline for different GCC versions in cpp mode (the affected versions are different from c mode), and build kitchsink.c as a cpp file too for testing
* silly bug in host platform.h
- The divider state needs to be saved for __aeabi_ddiv, __aeabi_fdiv, __aeabi_dtan and __aeabi_ftan or they won't work in interrupts *(probably not used much youd hope), or on an RTOS context switch
- Refactored code out for the integer and floating point cases
- Improved the floating point 'tests' in passing to check more return values against GCC implementations
- Added floating point usage to the IRQ nesting test case
Adds a new cmsis_core INTERFACE library, which provides the basic CMSIS macros/definitions, and RP2040.h and system_RP2040.h
By default the isr_ methods in the vector table are renamed to their CMSIS versions, but this can be overridden by defining PICO_CMSIS_RENAME_EXCEPTIONS=0