Commit graph

1138 commits

Author SHA1 Message Date
will-v-pi
a1faacff07
Remove reference to wafer_id (#2512)
`wafer_id` is not correct, as it is a 64-bit `device_ID` instead of a separate `device_id` and `wafer_id`
2025-06-10 08:49:04 -05:00
Marek Küthe
d7abd66dea
Fix typo (#2508) 2025-06-09 09:37:20 -05:00
Goran Miskovic
a9146b65ad
fix(async_context_threadsafe_background_execute_sync): prevent use-after-return by removing worker before semaphore release (#2494)
Ensures the async worker is unregistered from the context before releasing the
blocking thread. This prevents the `sync_func_call_t` stack object from being
accessed after it goes out of scope, avoiding a use-after-return condition
in multicore `async_context_execute_sync()` scenarios.

Fixes raspberrypi/pico-sdk#2433

Signed-off-by: Goran Mišković <schkovich@users.noreply.github.com>
2025-06-03 11:06:35 -05:00
will-v-pi
1ae2f0e32c
Don't include the picobin end block when sealing (#2492)
* Don't include the picobin end block when signing, as picotool will add a new end block anyway

* small whitespace fix

---------

Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
2025-05-30 16:17:46 -05:00
will-v-pi
6841d4d15b
Remove DEPENDS argument from add_custom_command(TARGET functions (#2489)
This raises a warning with recent CMake versions, and isn't required due to the `pico_add_link_depend` already added for these files

Fixes raspberrypi/picotool#235
2025-05-30 08:35:25 -05:00
will-v-pi
6860f0d882
Call enable_interrupts when initialising IRQs (#2491)
* Call enable_interrupts when initialising IRQs

Fixes raspberrypi/pico-examples#584, supercedes raspberrypi/pico-examples#588

* move enable_interrupts to the end though it doesn't make much difference

* guard enable_interrupts by !RP2040 as it isn't needed there

---------

Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
2025-05-30 08:33:04 -05:00
armandomontanez
67f89e44aa
Update Bazel pin, ignore build-* directories (#2461)
Updates the Bazel pin to 8.1.0 so that build-* directories can be
properly ignored.
2025-05-29 08:25:46 -05:00
Graham Sanderson
0722de395c
add new M33 processor exception handlers (#2482) 2025-05-29 08:18:05 -05:00
will-v-pi
6613aa45a5
Add support for creating self-decrypting binaries (#2315)
Note: this support is experimental until the next release

Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
2025-05-29 08:12:29 -05:00
Andrew Scheller
9fdfe110dc
Remove accidental comment words in stdio.h (#2480) 2025-05-23 07:15:44 -05:00
Graham Sanderson
c9c38252ec
remove assembler warning if StackSize or HeapSize are explicitly set to zero (#2465) 2025-05-21 06:57:09 -05:00
Jack Whitham
3515dad632
Fix multicore_lockout features so that the victim core cannot become stuck in an infinite loop if the lockout attempt times out (#2467)
* Fix issue 2454 flash safe execute lockout

The lockout state is controlled by a shared variable. The FIFO
is used to begin a lockout and acknowledge it (i.e.
multicore_lockout_handshake works as before) but the end
of the lockout is now signalled by updating the shared variable.
This ensures that timeouts are recognised reliably by the victim core.
__wfe and __sev are used to signal updates to the shared variable
in order to avoid polling.

* Update documentation for multicore_lockout_end functions

* Simplification, remove magic number (not required)

* Review improvements

* Restore use of non-zero magic number
2025-05-20 15:43:06 -05:00
Sergio R. Caprile
47f288b5d6
Add support for wiznet_w5100s_evb_pico2 (#2458)
* Add support for wiznet_w5100s_evb_pico2

This board has an RP2350 and a smaller 2MB flash

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>

* update to new syntax

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>

* fix missing definition

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>

---------

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
2025-05-20 15:41:49 -05:00
will-v-pi
cbd765644b
Minor fixups to compile with TF-M (#2403)
* Minor fixups to compile with TF-M

TF-M requires c99 compatibility, which throws errors at these lines

This patch fixes those errors and is currently applied by TF-M when cloning the SDK, but it would be better to get it into the SDK by default so that patch isn't needed

* #ifdef only on __STRICT_ANSI__

Also fix devinfo type
2025-05-20 15:41:30 -05:00
Graham Sanderson
8066bee734
give user more control over embedded_start_block.S contents (#2470) 2025-05-20 15:32:27 -05:00
27Onion Nebell
66540fe88e
Fix pioasm build failure caused by GCC 15 changes (#2448) (#2468) 2025-05-20 15:30:17 -05:00
will-v-pi
14d75c0b78
Add printout of picotool location (#2475)
This prints out the location of the picotool executable being used

For example:
* `Using picotool from /usr/local/bin/picotool` for a system install
* `Using picotool from /home/name/pico-examples/build/_deps/picotool/picotool` for a picotool fetched by the SDK
2025-05-20 15:29:41 -05:00
Graham Sanderson
550aa09624
fix typo in PICO_RUNTIME_SKIP_INIT_POST_CLOCK_RESETS (was missing INIT) (#2457) 2025-05-11 20:34:17 -05:00
Michael Brase
792f55628e
Use cyw43_delay_ms() in cyw43_spi_reset() instead of sleep_ms() (#2431)
Since cyw43_spi_reset() may be executed from an async context, we
should use cyw43_delay_ms() instead of sleep_ms(). This is particularly
a problem when using the async_context_threadsafe_background backend,
because sleep_ms() will assert in an ISR.
2025-05-08 10:26:08 -05:00
Graham Sanderson
799225d550
Add PICO_CRT0_NEAR_CALLS to indicate that crt0 can call runtimine_init/main/exit etc via near calls (#2452)
---------

Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
2025-05-07 08:56:40 -05:00
Graham Sanderson
7cdb8eca57
Add PICO_CRT0_NO_RESET_SECTION (#2453) 2025-05-07 08:56:19 -05:00
Andrew Scheller
0779dfe3eb
Small PICO_CONFIG tweak (#2456) 2025-05-06 09:14:20 -05:00
Tommy G
25789c433f
Fix wrong value used for lposc_freq_khz_frac and xosc_freq_khz_frac 2025-05-04 14:21:00 -05:00
Andrew Brock
ec25563b82
Fix binary_info compilation in C++ due to out-of-order designated initialisers (#2438) 2025-05-04 12:57:04 -05:00
Peter Harper
4bbd53371e
Fix sha build issues with mbedtls 3.x (#2447)
The mbedtls methods have dropped the "_ret" from the function names in
mbedtls 3.x. Use the new function names but support the old names if
mbedtls 2.x is used.
2025-05-02 08:42:53 -05:00
Peter Harper
0de8847b99
Crashes after calling btstack_cyw43_deinit (#2446)
You can deinitialise cyw43 and btstack by calling btstack_cyw43_deinit
but its pending and timeout workers are not removed which means they can
keep running, whcih causes a crash.

Add a btstack_run_loop_async_context_deinit method and call this from
btstack_cyw43_deinit.
2025-05-01 10:35:29 -05:00
Peter Harper
31fadf42eb
Revert "Add --recursive flag to git submodule cmd (#2416)" (#2445)
This reverts commit 5592322465.
2025-05-01 10:31:35 -05:00
will-v-pi
6e315799f5
Add script to extract CMake function descriptions (#2422) 2025-04-29 11:09:06 -05:00
Caleb Jamison
333944ac67
Update hellbender_2350A_devboard.h for release version of the board. (#2441)
* Update hellbender_2350A_devboard.h for release version of the board.

* Remove PICO_DEFAULT_SPI_CSN_PIN
2025-04-29 11:05:12 -05:00
Andrew Scheller
082d9f75cd
More board-header checks (followup to #2397) (#2442)
- make the error messages less misleading
- suggest replacing the old comment-style syntax with the new macro-style syntax
2025-04-26 12:15:26 -05:00
Andrew Scheller
ae332b3522
Ensure each test has a unique name (followup to #2208) (#2443)
mainly by fixing typos!
2025-04-26 12:13:36 -05:00
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 65a8907828.
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