Commit graph

1168 commits

Author SHA1 Message Date
andygpz11
6587f5cc9a
Add the required SYS_CLK_HZ definition to the suggested cmake output (#2022)
Fixes #2014
2024-11-06 10:24:10 -06:00
Earle F. Philhower, III
11961b97e4
Very minor typos in contributing.md (#1939) 2024-11-05 14:07:38 -06:00
Earle F. Philhower, III
ca0c0db979
Fix GCC14.1 compile error in w25x10cls.S (#2000)
GCC14 doesn't like the 2-character temporary label "00" and throws an error
.../pico-sdk/src/rp2040/boot_stage2/boot2_w25x10cl.S: Assembler messages:
.../pico-sdk/src/rp2040/boot_stage2/boot2_w25x10cl.S:147: Error: junk at end of line, first unrecognized character is `0'
.../pico/rp2040/pico-sdk/src/rp2040/boot_stage2/boot2_w25x10cl.S:150: Error: garbage following instruction -- `beq 00b'

Convert it to a single number, "1", like in other boot2xxx.S files

Fixes #1999
2024-11-05 14:06:04 -06:00
armandomontanez
e48a2e158c
[Bazel] Update rules_cc to v0.0.10 (#1989)
Updates rules_cc to v0.0.10 to reduce the steps required to get started
with creating a Bazel-based Pi Pico project.
2024-11-05 14:05:44 -06:00
Peter Harper
d649c6c77a
Add some tests (#1978)
* Test for best_effort_wfe_or_timeout sev issue

best_effort_wfe_or_timeout should not ignore an outstanding sev
See https://github.com/raspberrypi/pico-sdk/issues/1812

* Test for alarm being set in the past issue

See https://github.com/raspberrypi/pico-sdk/issues/1953
2024-11-05 17:27:19 +00:00
Graham Sanderson
bd130eddff
Remove code bloat in public SDK for 64K roms (#2016) 2024-11-05 10:57:22 -06:00
Graham Sanderson
8905de509f
Add missing instruction to vestigial copro_dis.py (#2018) 2024-11-05 10:54:26 -06:00
Graham Sanderson
37c6b24b1b
Add missing instruction to vestigial copro_dis.py (#2018) 2024-11-05 10:53:19 -06:00
Philip Howard
50322234b7
boards/pimoroni_plasma2350.h: correct flash size. (#2015)
Correct flash size from 8MB to 4MB to avoid wrapped addresses causing
firmware to be overwritten by the user filesystem in MicroPython.

Signed-off-by: Phil Howard <github@gadgetoid.com>
2024-11-04 13:12:11 -06:00
Hugh Nixon
98c114a8ee
Updated hardware/pio.h to correct the comment for the third (PIO 2) hardware PIO instance (#2004) 2024-11-04 13:11:46 -06:00
Dave Roth
37085889b0
Add RP2350 specific values to the exception_number enum (#1988) 2024-10-17 13:56:35 -05:00
Peter Harper
91dfbd01e8
Fix issue with free rtos execute sync (#1979)
Stop handle_sync_func_call removing the worker. Depending on thread priority
this can occur after the memory has gone out of scope in
async_context_freertos_execute_sync.

Fixes #1962
2024-10-17 13:55:20 -05:00
Peter Harper
66c7f0f607
Move cyw32 pin definitions (#1982)
It was probably not a good idea to put the default pin definitions in
cyw43_configport.h as they're specific to pico_w and Micropython needs
these but it has it's own version of cyw43_configport.h
2024-10-17 13:53:49 -05:00
armandomontanez
07d6dc1315
[Bazel] Fix bazel build, add presubmit (#1973)
* [Bazel] Fix bazel build, add presubmit

* Fixes a missing dep in the Bazel build breaking the host build.
* Automagically finds all board headers.
* Improves presubmit script polish for GH Action readiness.
* Adds a GitHub action workflow for the Bazel build.
* Disable failing checks
* Disables Windows, as there's a mix of real build errors and
  overly-ambitious checks that don't work on Windows.
* Disables extra checks temporarily since it's currently failing.
2024-10-12 17:41:43 -05:00
Petr Hosek
03a82f3d2f
Update Clang toolchain used by Bazel (#1976)
LLVM-libc baremetal build now includes `mktime` so we no longer need to
provide our own declaration in the polyfill header.
2024-10-12 11:24:18 -05:00
chrisboross
fa91723371
Update hellbender_0001.h (#1967)
Updating flash sizes to match BOM
2024-10-01 18:46:39 -05:00
Graham Sanderson
c675dfeaa5
fix mis-spelling of PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK (#1966) 2024-10-01 09:48:23 -05:00
Caleb Jamison
761bb1dba0
hellbender_0001 board file (#1957)
* hellbender_0001 board file

* Fix FTRX_RX_PIN, Fix define names to match filename
2024-09-30 16:17:45 -05:00
Graham Sanderson
bd5523cc64
Improve best_effort_wfe_or_timeout (#1822)
* #1812 improvements to best_effort_wfe_or_timeout

* Fix best_effort_wfe_or_timeout further by not having the IRQ ever move the alarm target backwards
2024-09-30 09:43:55 -05:00
Dhiru Kholia
cf8301f3e6
Doc fix for aon_timer on RP2350 (#1960) 2024-09-30 09:39:58 -05:00
Graham Sanderson
e2e0fd51c3
remove support for A0 & A1 versions of RP2350 (#1958) 2024-09-30 09:39:36 -05:00
Giampiero Baggiani
075e829cd9
Update i2c_slave.c: clock stretching comment fix (#1811)
* Update i2c_slave.c: clock stretching comment fix

This changed since 89914870ae

* Update i2c_slave.c
2024-09-27 23:54:47 -05:00
Matt Bennett
ff373b33dc
Fixes #1891 Update pico_configure_ip4_address comments (#1892)
* Update pico_configure_ip4_address comments

Update pico_configure_ip4_address CMakeLists.txt function comments to correct compile definition names

* Swap compile definitions in comments

Swap compile definitions order in pico_configure_ip4_address to group more naturally.
2024-09-27 23:54:12 -05:00
Andrew Scheller
78533ec119
Specify minimum cmake version for generic_board.cmake (#1879) 2024-09-27 23:53:44 -05:00
Stanislav Rubint
20cf7119f4
removed dangling #ifdef __cplusplus (#1941) 2024-09-27 23:52:39 -05:00
Peter Harper
66335f1dc7
Clarify that RP2350 gets its unique id from OTP (#1942)
* Clarify that RP2350 gets its unique id from OTP

Fixes #1915

* Wrap rp2040_specific and rp2350_specific bits
2024-09-27 23:51:39 -05:00
Dave Roth
8c08f2b8ff
Export linker scripts in the bazel build. (#1944)
* Export linker scripts in the bazel build.

Make the rp2040 and rp2350 linker scripts available in downstream
projects bazel builds.

* Move exports_files below the package declaration.
2024-09-27 23:50:22 -05:00
Andrew Featherstone
0e5ef0f40f
Fix hardware_alarm_irq_handler when using Timer 1 (#1949)
Correct the logic for determining `timer_num`. Previously this would
always evaluate to 0 due to using `alarm_num` instead of `irq_num`.

Fixes #1948.
2024-09-27 23:49:22 -05:00
Andrew Scheller
a0f828fb16
Fix doxygen typo (#1945) 2024-09-27 23:48:58 -05:00
Peter Harper
9f56a47dca
Avoid setting an alarm in the past (#1954)
* Avoid setting an alarm in the past

Fixes #1953

* Call ta_time_us_64 when needed

Remove local "now" variable.
2024-09-26 10:56:05 -05:00
graham sanderson
d08f36cd1c fix assertion failure in rp2350_chip_version 2024-09-20 12:18:18 -05:00
David Goffredo
780817a8c7
Fix comments next to enum gpio_irq_level values. (#1928)
The comments for the values of `enum gpio_irq_level` mix up zero and
one. This commit replaces "0" with "1" and vice versa where appropriate
in those comments.
2024-09-18 14:17:18 -05:00
Peter Harper
af2f42613e
Changes for pico2_w (#1816)
* Add board file for pico2_w

This is a copy of pico2 with the definitions from pico_w added.
Set PICO_BOARD=pico2_w

* Simplify CYW43 PIO config

cyw43_spi_init contains code to find a free PIO and state machine. This
can all be replaced with pio_claim_free_sm_and_add_program_for_gpio_range

* Make CYW43 gpio pins configurable at build time

The CYW43 gpio pins are currently hardcoded. Give the defines better
names and make them overrideable at build time.

Note: CYW43_PIN_WL_REG_ON and CYW43_PIN_WL_HOST_WAKE are already used by
the driver via cyw43_hal_* functions

* Fix pio initialisation

Need to make sure the pio can work with all the gpios

* Add missing doxygen for cyw43_set_pio_clock_divisor

* Support dynamic configuration of cyw43 gpio pins

Add CYW43_PIN_WL_DYNAMIC that means cyw43 gpio pins can be changed at
runtime.

Then CYW43_PIN_WL_* calls cyw43_get_pin_wl to get the gpio out of
the array.

cyw43_set_pins_wl can be used to change the cyw43 gpio pins although
care is needed when calling this?

* Some fixes for cyw32 gpio > 32

* Allow CYW43 to be configured with cmake

* Add default config of CYW43_WL_GPIO_COUNT to cyw43_configport.h

* Fix some review comments

Add some PICO_CMAKE_CONFIG
Stop using gpio_*_mask64 functions
2024-09-18 14:16:41 -05:00
Graham Sanderson
6500c59d70
Add busy_wait_at_leasy_cycles to host (#1925) 2024-09-11 18:33:33 -05:00
Mete Balcı
42e234f8f3
#1909 fix system_RP2350 typos (#1910) 2024-09-11 10:48:35 -05:00
Thomas Watson
0ed2840306
boot_stage2: improve reproducibility (#1907)
Specifying the final boot2 source file as a link library here causes the
final `.elf` to be linked directly with that `.S`, which causes it to be
compiled into an object file with a name like `/tmp/<random chars>.o`.
This temporary object name is embedded in the final `.elf`, so the
`.elf`'s contents change after each link even if none of the input files
change, breaking reproducibility.

Fix the issue by specifying the source file as the source for an
object-only library, then specifying the library's object files as the
target link libraries, so the source is compiled in a separate step and
only the object is passed to the linker.
2024-09-11 10:43:32 -05:00
seesturm
ec0037b508
Enable building with Bazel on Raspberry PI OS machines (#1921)
* Adding RaspberryPI OS as build host

* Add rp2350 for build on Raspberry PI OS
2024-09-11 10:34:44 -05:00
CMD
f12ac1c2c1
RISC-V inline assembly constraints fix - platform.h (#1923)
Changed the constraint from "l" (specific to ARM) to the general "r" in inline assembly used for RISC-V architecture.

This ensures most compilers are able to compile this header file.
2024-09-11 10:08:15 -05:00
armandomontanez
0f38151002
[Bazel] Update version string to 2.0.1-develop (#1885)
Updates the Bazel module version string to match the current CMake
version string for the develop branch.
2024-09-10 18:49:04 -05:00
Graham Sanderson
398ac2baf9
Some small fixes/improvements for pico_minimize_runtime (#1919)
* add PANIC and AUTO_INIT_MUTEX to pico_minimize_runtime; fix build with PICO_PANIC_FUNCTION=

* add pico_minimize_runtime for host builds - does nothing

* Add ALL option to pico_minimize_runtime
2024-09-10 18:45:25 -05:00
armandomontanez
b49d4ec949
Fix Bazel build breakages (#1908)
* Fix Bazel build breakages

* Adds support for new PICO_DEFAULT_UART_BAUD_RATE option.
* Fixes issues related to Picotool and boot_picoboot_headers.
* Adds pico_float RISC-V pieces to the Bazel build (not yet fully
  tested).
* Adds the missing adafruit board header to the Bazel build.

* Exclude hazard3 float test in Bazel validation script

* Restore missing dependency in hardware_boot_lock
2024-09-10 18:44:55 -05:00
Koji KITAYAMA
3a79149d2c
Fix a compile error by using clang-x86_64-pc-windows-msvc (#1890) 2024-09-05 11:37:39 -05:00
will-v-pi
dfb573818f
Use lib instead of CMAKE_INSTALL_LIBDIR for pioasm install (#1865) 2024-09-03 16:26:43 -05:00
Dranoel
f13306c8a7
Fix typo in documentation of PICO_RAND_ENTROPY_SRC_TRNG (#1794) 2024-09-03 16:21:33 -05:00
graham sanderson
b3cadb7de2 fix RISC-V build 2024-09-01 09:45:02 -05:00
Sylwester
d957c738db
Add RP2350 PicoADK variant (#1787) 2024-09-01 09:33:41 -05:00
Andrew Scheller
b98970f71e
PIO doxygen typo (#1894) 2024-09-01 09:31:41 -05:00
Nhan Cao
3bc866395c
Adding I2C Burst Reading/Writing feature (#1495)
* Adding I2C Burst Reading/Writing feature

* Add functions to header file.

Fixing: https://github.com/raspberrypi/pico-sdk/pull/1495

* Some missing changes

Rename the functions. Lose the "mode" and "blocking" needs to be at the
end.
Just set restart_on_next in the caller rather than adding a parameter.

---------

Co-authored-by: anhnhancao <nhan@earable.ai>
Co-authored-by: Peter Harper <peter.harper@raspberrypi.com>
2024-08-30 12:55:25 -05:00
Stefan Kerkmann
3cb21c8134
pico_bootrom: bootrom.h: fix -Wstrict-prototypes (#1888)
The refactoring of these functions removed the (void) in the function
declarations - thus compiling with -Wstrict-prototypes will yell at us
at compile time.

Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
2024-08-30 11:45:58 -05:00
Luke Wren
d886df6eb0
Add fast single-precision add/sub/mul for Hazard3 (#1883)
* Add fast single-precision add/sub/mul for Hazard3

* Make test output less noisy. Map -nan to -inf in vector gen. Move random vectors to separate files.

* Re-disable USB stdout for pico_float_test by default...

* Disable pico/float.h exports on RISC-V as these functions aren't implemented

* Add hazard3 instructions to asm_helper. Split hazard3.h to support this.

You can still include hazard3.h to get everything. This just allows you
to pull in less.
2024-08-30 11:36:30 -05:00