1107 Commits

Author SHA1 Message Date
Peter Harper
174cafc31a
Add CYW43_WL_GPIO_SMPS_PIN for pico_w and pico2_w (#2410)
Fixes #2361
2025-04-23 14:02:06 -05:00
Andrew Scheller
eee72cdca7
Fix submodule path typos (#2424) 2025-04-23 13:58:11 -05:00
Andrew Scheller
8421b451f7
Revert "Make doxygen buildable again (#2423)" (#2437)
This reverts commit 65a8907828ad87acd6a8e3363f175a64337b65cd.
2025-04-23 13:57:31 -05:00
Graham Sanderson
829c067ee7
add word alignment for rtwopi (#2429) 2025-04-20 19:25:29 -05:00
Andrew Scheller
65a8907828
Make doxygen buildable again (#2423)
Remove `\par` doxygen syntax which isn't supported by https://github.com/raspberrypi/doxygentoasciidoc
2025-04-15 08:28:07 -07:00
Graham Sanderson
fed7188e52
Rework use of pico_cmake_set in board headers to make it slightly less magic/confusing (#2397)
* 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>
2025-04-14 08:50:25 -07:00
Peter Harper
5592322465
Add --recursive flag to git submodule cmd (#2416)
Update all github workflows because picotool is (properly) using mbedtls
in pico-sdk and it now has its own submodules.
2025-04-11 21:35:09 -07:00
David Dyck
1ff632128f
Fix #2413 - Misleading comment about bootloader in rp2350/memmap_copy_to_ram.ld (#2415) 2025-04-11 09:36:29 -07:00
Peter Harper
6fea77f584
Change BT flash storage default for rp2350 A2 (#2412)
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
2025-04-11 09:22:20 -07:00
Peter Harper
1721f9db47
Add some docs for pico_set_lwip_httpd_content (#2411) 2025-04-11 09:20:49 -07:00
Peter Harper
f674850f0e
Fix DST bug in aon_timer_get_time for rp2040 (#2409)
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
2025-04-11 09:14:26 -07:00
Peter Harper
d47c0c89ce
Update mbedtls, lwip and cyw43-driver (#2405)
* 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
2025-04-11 09:14:02 -07:00
Scott Shawcroft
93ea261677
Force inline critical_section_{enter,exit} (#2393)
Otherwise it may end up in flash when we want it to follow the
caller's placement (maybe in RAM.)
2025-04-05 23:43:06 -05:00
Graham Sanderson
950a68f80e
define __force_inline in host compiles (#2396) 2025-04-04 13:18:28 -05:00
Andrew Scheller
5912699dd0
Lots of small doxygen fixes (#2390) 2025-04-04 11:39:39 -05:00
will-v-pi
701c1933af
Set default GATT path to CMAKE_CURRENT_LIST_DIR if not specified (#2385)
This ensures the GATT_PATH variable is set to the calling directory when just a filename is provided with no path

Fixes #2366
2025-04-04 11:36:32 -05:00
Andrew Scheller
c88bd53a68
Ensure that all RP2350 board-headers explicitly define PICO_RP2350A (#2370) 2025-04-04 11:35:42 -05:00
Andrew Scheller
5edf1a0a3c
Fix WindowsCI (again) (#2388)
Use newer version of ninja
2025-04-04 11:34:30 -05:00
Andrew Scheller
ad0bca9c85
Fix bug in extract_configs.py (#2389)
This bug was actually introduced by #1845 , but I never noticed until now because it depended on which order the filesystem traversed the directories
2025-04-04 11:33:18 -05:00
Graham Sanderson
f62bc4f5ea
Properly respect setting PICO_DEFAULT_BINARY_TYPE (#2381)
* Properly respect setting PICO_DEFAULT_BINARY_TYPE (rather than say PICO_NO_FLASH), and add a build error for specifying different types simulataneously
* remove dead code
2025-04-03 09:58:41 -05:00
Graham Sanderson
f154f58cf9
unclaim alarm on correct timer in ta_disable_irq_handler (#2382) 2025-04-03 09:57:59 -05:00
Graham Sanderson
ac3c458e81
move irq_has_handler() so it can be used without shared handlers (#2383) 2025-04-03 09:57:25 -05:00
will-v-pi
472c781a31
Fix sign conversion error introduced by #2233 (#2392) 2025-04-02 10:29:29 -05:00
Patrick Plenefisch
bb5b5f96e2
Move unique_id (configurably) earlier in the static init process (#2379)
This enables using the unique_id in C++ static initializers by default
2025-03-29 12:02:03 -05:00
will-v-pi
a5ba689cb5
Initial commit pulled in a bunch of stuff - see description
* Add `PICO_MINIMAL_STORED_VECTOR_TABLE` config replacing (`PICO_NO_STORED_VECTOR_TABLE` which was a lie
* Add `PICO_NUM_VTABLE_IRQS`` which allows you to limit the number of IRQs included in both the STORED or RAM vector tables, and make the rest of the SDK behave properly based on that
* Because these new variables in `pico_crt0` are circularly dependent somewhat with variables in `hardware_irq` hoist all the interdependent variables into a new `pico_platform_common` which is common to all `rp2` platforms
* Move some previously duplicated `pico_platform` code into `pico_platform_common`

Net effect:

1. if you set PICO_MINIMAL_STORED_VECTOR_TABLE=1, you get a 4 word VTABLE on Arm.. you still get a RAM vector table with up to PICO_NUM_VTABLE_IRQs (defaults to NUM_IRQs) but everything - including things like `isr_pendsv` point to `__unhandled_user_irq`.
2. PICO_NUM_VTABLE_IRQs (default NUM_IRQS) sets the number of IRQs that have handlers in the VTABLE (this affects the space reserved, and what the irq APIs let you touch - at least as far as invalid_params_if!)
3. If you set PICO_MINIMAL_STORED_VECTOR_TABLE=1 for a no flash binary, then PICO_NUM_VTABLE_IRQs is forced to 0 as there is no reserved space for the handlers.

Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
2025-03-26 16:44:21 -05:00
Graham Sanderson
39fafaa434
Add SPARE_IRQs to the SVD (#2271)
* Add SPARE_IRQ to RP2350 SVD (note not having an `<addresBlock>` or one with a size of zero is not a legal SVD, so including something hopefully harmless

* Add SPARE_IRQ definitions to RP2040 intctrl.h, and add assertions on competing #defines as these were called USER_IRQs in the SDK 1.x

* Add SPAREIRQ_IRQ to rp2040 assembler, and fix name on rp2350 - this is backwards incompatible, but unlikely used

* add SPARE_IRQs to RP2040 svd too
2025-03-25 13:14:28 -05:00
Andrew Scheller
fa94f6448a
Look for PICO_CONFIG: entries in .S files too (#2368)
(and fix the errors that this found)
2025-03-24 17:28:59 -05:00
Michael Brase
e43b7534ba
Add new stdio_usb_call_chars_available_callback() function (#2300)
When the user links in tinyUSB directly, the pico_stdio_usb library
disables some of its functionality, including its built-in background
processing thread. The user can implement their own background thread
in order to continue using the stdio functionality, except that there
is no wey to trigger the registered chars_available_callback. This
commit adds a new `stdio_usb_run_chars_available_callback()` method to
allow user's background threads to run the callback.
2025-03-22 18:47:40 -05:00
will-v-pi
f81851a2cb
Throw a warning when using the example signing/encryption keys (#2352)
* Raise a warning when using the example signing/encryption keys
  This is automatically disabled for pico-examples, and can be manually disabled by setting PICO_ALLOW_EXAMPLE_KEYS
2025-03-22 18:22:37 -05:00
will-v-pi
bbb94e51f9
Add rom_pick_ab_update_partition function (#2182) 2025-03-22 17:59:05 -05:00
Michael Brase
332eb5345b
Add new feature defines to pico_stdio_usb (#2296)
This change adds the following to pico_stdio_usb:
- `PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK`
- `PICO_STDIO_USB_ENABLE_TINYUSB_INIT`
- `PICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS`

These defines replace some ifdefs that were previously gated by the
`LIB_TINYUSB_DEVICE` define and will allow finer grained control.
All of these defines default to 1 if LIB_TINYUSB_DEVICE is not defined
and 0 if LIB_TINYUSB_DEVICE is defined, which should preserve the
old behavior.
2025-03-22 12:49:58 -05:00
David Dyck
005759d791
Fix #2253 cybt_printf by wrapping with NDEBUG (#2323)
Observe that src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus_driver.c
wraps the definition of cybt_printf with #ifndef NDEBUG
Apply this to src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c

Co-authored-by: David Dyck <david.dyck@checksum.com>
2025-03-19 16:16:43 -05:00
Andrew Scheller
645b33c31f
Update hellbender_0001.h (#2359)
Replace the incorrect `#define PICO_RP2350B 1` with the correct `#define PICO_RP2350A 0`

Fixes #2286
2025-03-19 11:03:53 -05:00
will-v-pi
3241bdc2f5
Fix PICO_PREVIOUS_PLATFORM error (#2357)
`INTERNAL` should be the type of the variable, not placed at the end of the `set` invocation - it implies `FORCE`
2025-03-18 14:18:37 -05:00
Graham Sanderson
ba936d3049
pico_lwip_arch is actually what depends on pico_rand (#2303) 2025-03-18 14:06:40 -05:00
Andrew Scheller
7d0f44b8b7
Fix tools/build_all_headers.py to cope with chip-specific headers (#2292) 2025-03-18 13:43:03 -05:00
Graham Sanderson
a995b975ec
Missed doc change in #850 (#2302) 2025-03-18 13:41:43 -05:00
Michael Brase
26e7dc5c48
Add Bazel label flag for overriding tusb_config.h (#2264)
This adds `//bazel/config:PICO_TINYUSB_CONFIG`, which is used to select
which tusb_config.h gets linked into the tinyUSB port. This defaults to
the tusb_config.h from the pico_stdio_usb (same as before), but allows
Bazel users to override this config with their own.
2025-03-18 13:41:14 -05:00
Christopher Chamberlain
6d8588d62c
Adjust generated name to match pio_mov_status_type (#2324)
The enum pio_mov_status_type expects the member name to be STATUS_IRQ_SET.
2025-03-18 13:39:38 -05:00
David Dyck
6a56480879
Remove FIXME delete comment (#2341)
Fixes #2337
per @kilograham
2025-03-18 13:39:10 -05:00
Andrew Scheller
3751bc5f98
Check for the misuse of '#define PICO_RP2350B' in board headers (#2290) 2025-03-18 13:31:21 -05:00
Damien George
cc1ac399ed
Remove assignment of cyw43 last_size/header/backplane_window variables (#2306)
They are never used by the cyw43-driver code, because `F1_OVERFLOW_CHANGE`
is disabled.

Signed-off-by: Damien George <damien@micropython.org>
2025-03-18 13:28:15 -05:00
gsboylan
a45e1e46f5
Add board file for Eelectronicparts Pico Mini in 2,4,8,16MB variants (#2346)
Store page and pinout diagrams are here:
https://www.eelectronicparts.com/products/rp2040-pro-mini-pico-development-board-for-raspberry-pi-dual-core-mciro-python
2025-03-18 13:27:07 -05:00
Dryw Wade
4f31ef1761
Add SparkFun XRP Controller header (#2347) 2025-03-18 13:22:27 -05:00
eightycc
ab12d556cd
Fix use of PICO_RP2040 macro. (#2356) 2025-03-18 10:08:11 -05:00
Graham Sanderson
b1676c18a3
fix return type of enable/disable interrupt methods... add host versions for completeness (#2310) 2025-03-09 14:39:21 -05:00
Alex Brudner
dd1f48335b
Add upcoming sparkfun board (#2329) 2025-03-05 10:46:07 -06:00
Andrew Scheller
26ab4be834
Fix misleading error messages in spin_lock.h (#2326)
(looks like this was a copy-paste mistake)
2025-03-03 11:21:16 -06:00
graham sanderson
c7ff325fb3 Merge branch 'master' into develop to pick up doc fix 2025-02-19 16:33:42 -06:00
graham sanderson
ee68c78d0a fix doc for SYS_CLK_VREG_VOLTAGE_AUTO_ADJUST_DELAY_US 2025-02-19 16:32:05 -06:00