1098 Commits

Author SHA1 Message Date
William Vinnicombe
c37cc02b51 Fix support for old versions 2025-04-09 17:38:30 +01:00
William Vinnicombe
62671a806d Rename to pico_board_cmake_set and pico_board_cmake_set_default 2025-04-09 11:45:40 +01:00
William Vinnicombe
2da1687790 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
2025-04-09 11:41:38 +01:00
William Vinnicombe
df7d848b3a Update check_board_header.py with the new pico_cmake_set formats 2025-04-09 11:40:12 +01:00
graham sanderson
c74a695dc3 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
2025-04-04 12:56:36 -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
graham sanderson
c871e759c6 start 2.1.2-develop 2025-02-18 19:46:23 -06:00
graham sanderson
bddd20f928 SDK 2.1.1 Release 2.1.1 2025-02-18 17:55:53 -06:00
graham sanderson
a994a8abce temporary disable bazel CI check against referened picotool 2025-02-18 17:27:48 -06:00
graham sanderson
b5af60771c bump SDK version to 2.1.1 and update picotool dependency since 2.1.1 is faster 2025-02-18 17:27:39 -06:00
graham sanderson
6a7b4c7160 fix warning 2025-02-18 17:20:22 -06:00
Graham Sanderson
2dd58bff9e
fix emulated asynchronous divisions started via hw_divider_divmod_s32_start and hw_divider_divmod_u32_start (#2299) 2025-02-18 12:18:25 -06:00
Graham Sanderson
186e715462
fix up access type of CHAN_ABORT register in RP2040.svd and RP2350.svd (#2270) 2025-02-18 12:17:34 -06:00
Graham Sanderson
a38da922e5
add cast (#2298) 2025-02-18 11:48:48 -06:00
Graham Sanderson
c757f36aac
add PICO_USE_FASTEST_SUPPORTED_CLOCK, and support vreg setting and SYS_CLOCK_MHZ=200 for rp2040 (#2285) 2025-02-18 09:51:51 -06:00