Skip to content

Minor cleanups#3020

Closed
kilograham wants to merge 189 commits into
masterfrom
minor-cleanups
Closed

Minor cleanups#3020
kilograham wants to merge 189 commits into
masterfrom
minor-cleanups

Conversation

@kilograham

Copy link
Copy Markdown
Contributor

common stuff

kilograham and others added 30 commits July 29, 2025 07:01
find src -type f -perm /a+x -name '*.h' -print0 | xargs --null chmod -x
The order depends on whether you're enabling or disabling
* Update sha256_alt.h

Fix trivial copy-paste error in comment

* Update README.md

Another small typo in documentation
Fix copy-paste-error. With RP2350's Hazard3 should never show up, but anyway.
The sideset_bit_count in pio_encode_sideset_opt is unsigned, so any comparison
"sideset_bit_count >= 0" will always be true.  GCC with pedantic warnings
will complain when this happens.

Remove the unneeded >=0 portion of the parameter validity check.

Fixes #2607
Since ARM hosts have builtins listed in hardware/sync.h, these builtins
should be clobbered. Newer versions of LLVM/Clang emit an error when
clobbering these builtins, so this switches the overrides to use the
same patterns as pico_atomic to clobber the builtins.
…2632)

Partially fixes #2630, as it doesn't take care of the required delay between setting the LED
If the compiler in use offers __sev(), __wfe(), or __wfi(), forward
declare them to be sure they're available for use.
* Add Raspberry Pi 500 board support

- W25X10CL flash configuration for DSPI mode
- USB standalone operation support
- Complete GPIO pin documentation with keyboard matrix mapping
- Debug UART configuration on GP16
- Hardware-specific boot and power management settings

Tested with TinyUSB MIDI example - successful enumeration and operation.

* Correct Pi 500 board support: RP2040 chip, proper naming

- Rename to raspberry_pi_pi500_rp2040.h for clarity
- Correct chip type from RP2350 to RP2040
- Remove pico2.h inheritance, use self-contained definitions
- Add comprehensive GPIO pin mapping documentation
- Include critical power management warning
- Configure W25X10CL flash support for RP2040

* PICO_RP2040_B0_SUPPORTED can be changed to 0, since all Pi 500s are using RP2040 B2.

* Update Raspberry Pi 500 board support for minimal original intent.
- Fix mistake done in pico.h PICO_RP2040_B0_SUPPORTED 0 => 1
- Disable B0 support in pi500_rp2040
- Fix flash size 1M-Bit not 1Mb
- Add Matrix pin definition

* Fix flash size.
Add warning on GP19
Remove GP17

* Adding UART TX GP16

* Add Caps led as default led

---------

Co-authored-by: Jerome Hordies <jerome.hordies.ext@luminus.be>
…2671)

Includes rejigging it a bit, as the checking script requires #defines for all configs
Co-authored-by: Andrew Pochinchik <andrew.pochinchik@ftco.ltd>
Fixes #2678

The FreeRTOS, Poll, and Threadsafe async_context implementations have
execute_sync functions that's set as a member of their
async_context_type_t struct for use by the user-visible async_context
API.  These implementation functions should not be accessible
by user code which chouls only use async_context_execute_sync and
not the low-lever async_context_{freertos,poll,threadsafe}_execute_sync
implementation.

Make these private functions static like the other low-level functions
in the async_context_type_t struct.
Bazel configuration adds a dependency on hardware_claim in 'host' but
it doesn't exist there.  It's in 'common'.

Fixes #2738
* Add empty 'check_gpio_param' to host GPIO

All the approriate gpio_xxx functions now call check_gpio_param.  This
provides an easy way for a project to add simple range checking by
defining a final version of check_gpio_param, which whatever error
mechanism it chooses if an invalid value is passed.

Refs #2736

* Declare all host GPIO functions weak

This allows them to be easily overridden by user code for testing
purposes.

Refs #2736

* Mark all parameters in host GPIO unused

This prevents lots of compiler warnings if the default warning level
is increased.

Refs #2736

* Add missing functions/types to host GPIO

Some RP2350 GPIO_FUNC_ enums don't match the values defined in the
rp2350 hardware header but the actual values shouldn't matter if only
the enums are used (i.e. no magic numbers).

Refs #2736
peterharperuk and others added 22 commits June 15, 2026 18:46
Return false if async_context_threadsafe_background_init fails.

Fixes #2672
This function is implemented by cyw43_driver using lwip to determine
when the link is up and an IP address has been assigned.

If you are not using lwip you get a link error as it's used in
cyw43_arch_wifi_connect_bssid_until

As with other cyw43 lwip functions we need a weak implementation that
panics as we expect the app to provide their own implementation if
not using lwip.

Fixes #2704
* Add weak powman_timer_get_lposc_calib_freq function

By default this reads from valid OTP if PICO_POWMAN_CALIBRATE_LPOSC_FROM_OTP is set (like before), but it is weak so can be overridden by the user (eg to use frequency_count_khz instead)

The existing behaviour of powman_timer_set_1khz_tick_source_lposc is unchanged, other than the addition of ignoring out-of-range OTP values on RP2350

* Add LPOSC_MIN_EXPECTED_HZ and LPOSC_MAX_EXPECTED_HZ defines
* Update cyw43-driver

Just uses the latest from main.
Fixes #2729

* Update cyw43 version in Bazel
* Update mbedtls to 3.6.6

* Update mbedtls version in Bazel
* Add clock_configure_mhz

Trades off accuracy (only gets to +/- 1MHz) for reduced code size as it doesn't need 64 bit division

* Review fixup

Fixup for dividers 1.0-2.0 on RP2040

Improve docs

* Update src/rp2_common/hardware_clocks/include/hardware/clocks.h

* Add return to doxygen

* Take uint32_t, and add explicit check that it fits in CLOCKS_CLK_GPOUT0_DIV_INT_BITS

This is because it could technically take up to 24-bits on RP2040 as the DIV_INT_BITS is larger, although it's unlikely anyone would need >65535MHz

* Tidy up `// Store the configured frequency` comments

The storing actually happens in `clock_configure_internal`
…ixup references and comments (#3011)

Should now describe what actually happens with boot2 on RP2350

Also add a kitchen sink variant with PICO_EMBED_XIP_SETUP=1 to check it still works
…scalls (#3014)

* remove nosys.specs from main build as pico_libc_interface provides syscalls

* actually remove it from boot_stage2 too, as it is clearly unnecessary as they were all guarded by PICO_LIBC not PICO_CLIB so were not included anyway of late
* add .gitattributes for LF line endings, and fixup content

* oops - missed .gitattributes
* Writes are untranslated, so reads should be too
Fix duplicated wrapper definition

Fixed BUILD.bazel and CMakeLists.txt from duplicated wrapper definition of __clzsi2
…ntation (#2989)

Co-authored-by: Andrew Scheller <lurch@durge.org>
Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
* fix -fanalyzer warnings (from Arm GCC 14.2/15 at least) - don't plan to fix false positives from earlier versions

* suppress false positive fanalyzer warning that only shows up in release mode
* Update btstack to v1.8.2

* Update bazel for new btstack version
* Add tests of improved picotool packaging

* Move section_xip_ram and sections_psram before data in linker scripts

Initialised data must come before uninitialised, so section_xip_ram must come before section_persistent_data

Neither of these place anything in SRAM for default binaries, so this doesn't change the ram_vector_table location

* Update memmap annotations

* Fix debugger start for XIP_RAM binaries

These require a smaller window size, so pass LENGTH(RAM) from the linker script instead of (SRAM_END - SRAM_BASE)

* Add hashing and signing test to check squashing is working for those

* Fix guards around some xip_sram test binaries

* Switch to new section_no_flash_end.incl for calculating ram window start and size, and add to Risc-V
* Allow response to be changed in makefsdata script

Currently the response contents are hardcoded.
This prevents using the makefsdata script to implement a captive
portal where we have to send a redirect when a 404 result would be
returned.

When loading file contents, look for a file with the same name with
a "response" extension and use its contents for the response.

We can then use this for the access point example which can then be
simplified.

Fixes #2646

* Change .hdr file to .response

Only return on zero contents if a .response file is found.

* Apply suggestion from @lurch

Co-authored-by: Andrew Scheller <lurch@durge.org>

---------

Co-authored-by: Andrew Scheller <lurch@durge.org>
@kilograham kilograham added this to the 2.2.1 milestone Jun 20, 2026
@kilograham kilograham requested a review from will-v-pi June 20, 2026 23:25
@github-actions

Copy link
Copy Markdown

Please do not submit against master, use develop instead

@kilograham

Copy link
Copy Markdown
Contributor Author

wtf where has the button to change branch gone?

@kilograham kilograham closed this Jun 20, 2026
@kilograham kilograham modified the milestones: 2.2.1, none Jun 20, 2026
@lurch

lurch commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

wtf where has the button to change branch gone?

Looks like you now have to click the "Edit title" button (pencil icon) and this also gives you the option to change the base branch. More unintuitive UI updates from GitHub 🙄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.