1098 Commits

Author SHA1 Message Date
waveshare
61e2712057
Added some weveshare board support (#2145)
Signed-off-by: eng33 <eng33@waveshare.com>
Co-authored-by: eng33 <eng33@waveshare.com>
2025-01-18 13:48:26 -06:00
Petr Hosek
4b6e647590
Update Clang toolchain used by Bazel (#2151)
* Update Clang toolchain used by Bazel

* <time.h> include

* Sort includes

* Use libc timeval definition

* Disable unwinder linking for now

* Link libm
2025-01-13 15:59:03 -06:00
Lesords
306c461cd3
Fix: solve the problem that micropython could not be used (#2098) 2025-01-11 14:07:59 -06:00
Peter Harper
5202c272cb
Initialise stack in async_context_execute_sync call (#2106)
We need to do this to avoid work_pending being set twice.

Fixes #2101
2025-01-11 14:06:12 -06:00
Osman Karaketir
fc37bede32
Fix Doxygen comment (#2175)
remove incorrect pool parameter
2025-01-11 14:04:10 -06:00
Andrew Scheller
1b80db289d
Restore the "API Documentation" link in sidebar when building with Doxygen >= 1.9.8 (#2135) 2025-01-11 14:02:40 -06:00
Andrew Scheller
7bd430d7d6
Fix RP02040 typos (#2168) 2025-01-11 13:53:45 -06:00
Jean Jonethal
e7a0e61165
convert windows path delimiter to posix (#2149) (#2150)
* convert windows path delimiter to posix (#2149)

* add explicite variable assignment for intermediate resource name conversion result (#2149)
2025-01-07 11:05:13 -06:00
Peter Harper
969f5895aa
ta_set_timeout can fail to set an alarm (#2127)
* 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
2024-12-06 10:39:04 -06:00
Andrew Scheller
ba7aa3f075
Fix mis-matched backticks in doxygen (#2104) 2024-12-04 14:51:48 -06:00
will-v-pi
54784f884b
Add rom_data_lookup_inline function (#2116)
* Move rom_data_lookup code into rom_data_lookup_inline

Allows ROM data lookup from FLASH/RAM sensitive code

* Use rom_data_lookup_inline in flash_devinfo_ptr

Fixes bug introduced by #2082 where flash_devinfo_get_cs_size would use rom_data_lookup from flash during a __no_inline_not_in_flash_func
2024-12-02 11:19:55 -06:00
Peter Harper
fe81780508
Update btstack license. (#2115) 2024-12-01 11:17:13 -06:00
Graham Sanderson
f0a1ff3c03
Fixes for/found by documentation generation (#2099)
* fix errors breaking extra_[cmake_]configs.py
* remove trailing whitespace which is confusing asciidoctor
* fix rp2xxx-specific -> rp2xxx_specific
* add missing xip_cache funcs to the combined docs
* Revert "fix errors breaking extra_[cmake_]configs.py"
* Fix typo in #define name
* Allow optional whitespace at the start of "commented out" config lines

Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
2024-11-25 12:30:55 -06:00
graham sanderson
bb916f4704 start 2.1.1-develop 2024-11-25 00:44:24 -06:00
graham sanderson
95ea6acad1 SDK 2.1.0 release 2.1.0 2024-11-24 23:44:29 -06:00
graham sanderson
beb2449622 Update picotool dependency to 2.1.0 (not strictly required, but we prefer people to be on the latest) 2024-11-24 23:43:46 -06:00
graham sanderson
2a1e1af6af Add missing CYW43_DEFAULT_PIN_WL_CS to pimoroni_pico_plus2_w_rp2350.h 2024-11-24 20:33:51 -06:00
Gonzalo Larralde
b7e255d18d
Add board file for Pimoroni Pico Plus 2 W (#2092)
* Add board pimoroni_pico_plus2_w_rp2350.
2024-11-24 20:04:39 -06:00
yh-sb
58e253ce04
Fix implicit declaration warning (#2093)
pico-sdk/src/rp2_common/pico_flash/flash.c:155:33: warning: implicit declaration of function 'make_timeout_time_ms'
pico-sdk/src/rp2_common/pico_flash/flash.c:156:77: warning: implicit declaration of function 'time_reached'
2024-11-24 19:44:36 -06:00
Graham Sanderson
5f607a9829
Comment out CMake cyw43 vars which aren't really that useful in general i don't think (#2090) 2024-11-24 11:27:10 -06:00
Graham Sanderson
a6ae2e6e4a
Fix compilation warnings (#2089) 2024-11-23 13:41:51 -06:00
yh-sb
3c39eecea3
Fix CMake build. (#2088)
hardware_watchdog depends from pico_bootrom due to header pico/bootrom.h

BUILD.bazel also has this dependency.
2024-11-23 13:02:57 -06:00
Luke Wren
65d118c342
RISC-V __mulsf3: handle exponent increase due to rounding (#2086) 2024-11-23 13:02:03 -06:00
Graham Sanderson
39a7f97116
Cleanup/clarification of PIO behavior with >32 pins (#2085) 2024-11-22 13:13:15 -06:00
Graham Sanderson
3dce58f21b
support both struct timespec and struct tm variants of the aon timer APIs (#2079)
* support both struct timespec and struct tm variants of the aon timer APIs since use of one type on RP2040 and the other on RP2350 require pulling in C library code. Provide weak pico_ wrappers for localtime_r and mktime so that the user can override the conversion functions
2024-11-22 12:11:02 -06:00
will-v-pi
2692d9a4cb
Propogate changed pico_cmake_set_default values to the compilation (#2034)
* Propogate non-default pico_cmake_set_default values through to compile definitions

Add PICO_BOARD_CMAKE_OVERRIDES common scope variable, to contain any pico_cmake_set_default
CMake variables which have been overwritten. This allows passing CMake arguments to the
build, without needing extra target_compile_definitions.

Also add pico_cmake_set_default PICO_RP2350_A2_SUPPORTED to enable/disable the E10 abs-block fix

* Fix more board files missing pico_cmake_set_default PICO_RP2350_A2_SUPPORTED

* Apply @lurch's patch to check_board_header.py
2024-11-21 17:47:51 -06:00
armandomontanez
338f99ff1c
Initial Pico/2 W Bazel support (#2049)
* 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
2024-11-21 16:58:02 -06:00
Graham Sanderson
08ea1d89a9
prevent self-deadlock with PICOLIBC due to calloc/realloc internally calling malloc/free (#2069) 2024-11-21 16:53:24 -06:00
Luke Wren
7b07b0b6a1
Save/restore QMI window 1 registers across calls to flash_exit_xip(). (#2082)
* Save/restore QMI window 1 registers across calls to flash_exit_xip().

This works around the RP2350 ROM reinitialising window 1 even when it
does not actually issue an XIP exit sequence to that QSPI device. If no
exit sequence is issued, then the original configuration still applies.

This is not valid in the case where the ROM *does* issue an XIP exit
sequence to the second chip select, because the original mode is no
longer valid once the device is in the serial command state. The ROM
does this when FLASH_DEVINFO (loaded from OTP, stored in boot RAM) has a
nonzero size for chip select 1. To distinguish the two cases, this patch
adds getters/setters for FLASH_DEVINFO.

If chip select 1 has a nonzero size in FLASH_DEVINFO then the ROM's
register changes for window 1 are not reverted, and instead the
hardware_flash code makes additional changes to ensure writes also work
(as the ROM only reinitialises for reads).

This means that, in the case you have opted into ROM support for the
second chip select by setting a nonzero CS1 size in FLASH_DEVINFO, the
device on chip select 1 will continue to function correctly, but full
performance won't be restored until it is reinitialised. The best way to
handle this is initialising both chip select devices in your XIP setup
function (your boot2).

* Fix whitespace. Fix handling of PICO_FLASH_SIZE_BYTES == 0.
2024-11-21 16:52:34 -06:00
Graham Sanderson
9762b00c13
disable all IRQs in dma_chanel_cleanup - fixes for RP2350 (#2060) 2024-11-21 16:52:04 -06:00
Graham Sanderson
6bb44dd07d
Make all float->int/frac conversions round to nearest by default (#2065)
* making pio_calculate_clkdiv8_from_float round to the neareset 1/256 (not lower 1/256)

* chage rounding of all float clkdivs to round to neareset; default to nearest (which is a backwards incompatible change, but I think OK), and add ability to turn it off

* fix copy/paste errors in PICO_CONFIG

* Calculate size of FRAC field using its own MSB and LSB, rather than hoping that INT_LSB is in the right place

* Add a new REG_FIELD_WIDTH macro, and make the calculation of the clock-dividers more consistent

---------

Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
2024-11-21 16:48:33 -06:00
Graham Sanderson
5a98889434
add rom_reset_usb_boot_extra which supports >32 pins and ACTIVE_LOW; change existing uses to use this (#2084) 2024-11-21 16:48:05 -06:00
Graham Sanderson
6bb3ccf822
some minor pioasm fixes for #1950 (#2056) 2024-11-21 11:56:22 -06:00
Jack Wilsdon
8970241772
Fix flash_safe_execute timeout under FreeRTOS (#2021)
In some cases, the flash lockout task can start on the wrong core and
not have time to move to the correct core before exit is called. This
causes a timeout as the exit function is looking at the wrong core when
checking for the lockout task.
2024-11-21 11:24:17 -06:00
Luke Wren
36fefb5f30
Implement pico_bootsel_via_double_reset with the POWMAN DOUBLE_TAP flag on RP2350. (#2083)
The existing RAM implementation does not work because asserting the RUN pin holds SRAM in power-down.
2024-11-21 10:31:33 -06:00
Graham Sanderson
90bfb532a7
provide slightly meaningless _start symbol for boot_stage2 to make LLVM lld happy (#2080) 2024-11-21 10:10:12 -06:00
Graham Sanderson
31c1be5d5c
make panic loop back to breakpoint FWIW, and remove spurious header (#2062) 2024-11-21 10:00:38 -06:00
Andrew Scheller
f3459a45d4
Update documented max PIN values, to accomodate RP2350B (#2072) 2024-11-20 20:28:54 -06:00
Andrew Scheller
e17a82d291
Change __always_inline to __force_inline to suppress GCC errors (#2078) 2024-11-20 18:06:50 -06:00
newbrain
105a2b89d5
Update pwm.h (#2077)
NUM_DMA_IRQS was used instead of NUM_PWM_IRQS
2024-11-20 18:05:50 -06:00
will-v-pi
6bf5d9bf7d
Enforce ordering of pico_add_extra_outputs and picotool functions (#2054)
* Thow FATAL_ERROR when using post-processing functions after pico_add_extra_outputs

* Remove property definition, and rename to `PICOTOOL_PROCESSING_CONFIGURED` and `picotool_check_configurable`

* done -> configured
2024-11-20 16:43:05 -06:00
Graham Sanderson
9a2b75e26e
prevent early macro expansion in PICOBIN_..._AS_BITS() macros (#2068) 2024-11-20 16:42:19 -06:00
will-v-pi
74db3c2d86
Update work area size from 3064 to 3264, and recommend 3.25K (#2073) 2024-11-20 16:41:48 -06:00
Andrew Scheller
d3080e777f
Slight tweak to the config-extraction scripts. (#2070)
* Slight tweak to the config-extraction scripts.
A small logic bug meant they were reporting more false-positive warnings than they should have been.

* Small code tidy-up
2024-11-20 16:41:28 -06:00
Peter Harper
54d4f3a8f7
Add some missing pio functions (#2074)
Adds some 64 versions to work with rp2350b and more than 32 pins.
Change cyw43 code to use the new function.

Fixes #1834
2024-11-20 16:38:05 -06:00
Graham Sanderson
46283dd00f
github action upgrades (#2075)
* Windows workflow: bump cmake version

* Actions: update all workflows to checkout@v4
2024-11-20 11:02:03 -06:00
Graham Sanderson
06a244b2b5
fix incorrect disassembly of MOV rx_fifo (#2067) 2024-11-20 10:57:22 -06:00
Graham Sanderson
c2118cc005
allow PICO_CORE1_STACK_SIZE=0 (#2058) 2024-11-20 10:56:25 -06:00
Graham Sanderson
08bf6a7faa
use configured uart_instance rather than default instance for flushing stdio uart (#2066) 2024-11-20 10:45:20 -06:00
Andrew Scheller
2a4dbd9b7c
Small comment typo (#2064) 2024-11-20 10:44:50 -06:00