Commit Graph

828 Commits

Author SHA1 Message Date
graham sanderson
efe2103f9b SDK 2.0.0 release
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
Multi GCC / build (push) Has been cancelled
2024-08-08 08:54:38 -05:00
Andrew Scheller
45984e276f
Small tweak to extract_configs.py (#1776)
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
Always write the path as "abosolute" (relative to the root of pico-sdk) as that makes searching for it (when building the RP2040 datasheet) much faster. This matches the behaviour of extract_build_defines.py and extract_cmake_configs.py
2024-07-25 15:13:00 -05:00
andygpz11
b3bf690d0a
Clarify uart_write_blocking() API vs UART still busy sending (#1274) (#1709)
Some checks are pending
CMake / build (push) Waiting to run
Build on macOS / build (push) Waiting to run
Build on Windows / build (push) Waiting to run
2024-07-25 11:12:21 -05:00
Andrew Scheller
9f85f25640
Add extra checks to check_board_header.py (#1775)
* Small whitespace fixup

* typo bugfix

* Small refactoring of check_board_header.py

* Make structure of rp2040_interface_pins.json more explicit, so that it can be more easily extended

* Move definition of valid-pins from python to json

* Check that each interface includes all (minimally) expected pins
Note that UART_CTS, UART_RTS & SPI_CSN are classed as optional

* Split "expected_functions" into "required" (all of these pins must be present) and "one_of" (at least one of these pins must be present)
2024-07-25 09:47:26 -05:00
WallyWare
6624098756
Add board file for Pi-Plates MICROPi (#1487)
Some checks are pending
CMake / build (push) Waiting to run
Build on macOS / build (push) Waiting to run
Build on Windows / build (push) Waiting to run
2024-07-24 07:21:54 -05:00
graham sanderson
41b4d3adb4 rename gpio_set_function_mask to gpio_set_function_masked to match naming schema of other gpio functions 2024-07-24 07:00:37 -05:00
George Peppard
7c5b426a0f
Add gpio_set_function_mask function (#1462) 2024-07-24 06:47:59 -05:00
Gigahawk
af9b47c668
Add board definition for Adafruit Feather RP2040 with USB Type A Host (#1761) 2024-07-24 06:29:53 -05:00
Chris Burton
b45632b06e
Add 8086 USB Interposer board (#1767) 2024-07-24 06:27:38 -05:00
Peter Harper
5ec40711f4
Some doc issues (#1772)
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
* Fix doxygen for uart example

Fixes https://github.com/raspberrypi/pico-sdk/issues/1685

* Clarify uart write

will block until data "has been sent to the UART transmit buffer"

Fixes https://github.com/raspberrypi/pico-sdk/issues/1481

* Add note to flash API about erasing sectors

Fixes: https://github.com/raspberrypi/pico-sdk/issues/650
2024-07-23 13:00:41 -05:00
Peter Harper
6328fffc71
Update LwIP to 2.2.0 (#1769)
Some checks are pending
CMake / build (push) Waiting to run
Build on macOS / build (push) Waiting to run
Build on Windows / build (push) Waiting to run
Fixes #1565
2024-07-22 10:01:24 -05:00
graham sanderson
7f37af837b add missing rtt cmake functions for host
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
2024-07-20 20:58:34 -05:00
Andrew Fernandes
0996a9e354
Add support for SEGGER RTT STDIO (updated) (#1411) 2024-07-20 20:52:41 -05:00
felixdoerre
c93c3f49ec
Use CYW43_PRINTF macro in cyw43-support code. (#1745)
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
Without this change, using cyw43 has a dependency on printf code for printing
error message. Everywhere else in cyw43-code this dependency is masked with the
CYW43_PRINTF-macro. This PR extends the usage of the CYW43-PRINTF macro to the
SPI-support code.
2024-07-09 10:32:43 -05:00
graham sanderson
b1abf96cec Revert "Add C11 standard atomic support (#1645)"
Some checks are pending
CMake / build (push) Waiting to run
Build on macOS / build (push) Waiting to run
Build on Windows / build (push) Waiting to run
This reverts commit 01dec6fb6f.
2024-07-08 18:54:48 -05:00
Stephen Street
01dec6fb6f
Add C11 standard atomic support (#1645)
* Add runtime support for stdatomics

* Fix lock calculation and enable atomic_flag support
2024-07-08 18:38:06 -05:00
Mr. Jake
86aab81c47
IRQ enabling guard (when no callback set) (#1504)
Some checks failed
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
2024-07-07 12:57:50 -05:00
Graham Sanderson
74b9ea4d46
use best_effort_wfe_or_timeout instead of wfe (#1404) 2024-07-07 11:42:07 -05:00
Jack Wilsdon
778221ba99
Add missing semicolon (#1750) 2024-06-27 17:45:55 -05:00
Graham Sanderson
73e719691d
#1748 replace incorrect license (#1749) 2024-06-27 09:58:42 -05:00
aizaki77
8b0146c142
Fixed an issue that caused incorrect settings when the SPI clock was less than 244141Hz. (#1633) 2024-06-27 09:28:46 -05:00
MarcinKlosowskiMobica
f5b7a9135b
corrected issue#1536 - used correct define to create a configuration mask (#1613) 2024-06-21 14:38:48 -05:00
Sonya Vasquez
9290bdde58
fix harware_alarm_irq_number typo (#1619) 2024-06-21 14:38:20 -05:00
Peter S. Hollander
2de70c79c2
Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags (#1620)
* Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags

Setting CMAKE_${LANG}_FLAGS_DEBUG_INIT specifically only sets the flags for the Debug config the first time it is configured by CMake, pulling the initially-configured flags from CMakeCache.txt on subsequent configurations. This causes PICO_DEOPTIMIZED_DEBUG to not have any effect after the initial configuration, causing breakpoint issues when debugging certain functions.

Clearing the cache of the debug flags allows the flags to be updated every configuration, and appended to appropriately (such as with "-g").

See Issue #1618 and the comments of Pull Request #1620 for further details.

Fixes #1618
2024-06-21 14:37:33 -05:00
Maarten van der Schrieck
f5fea7f09b
pico_cyw43_driver/cyw43_bus_pio_spi.c: make SPI_PROGRAM_NAME and CLOCK_DIV configurable in makefile (#1499) 2024-06-21 14:35:51 -05:00
Peter Harper
5d36c90331
Make it easier to configure default baud rate (#1648)
To make stdio logging quicker it's probably a good idea to set the default
uart speed 921600, but it's only configurable by adding this define to
your project. Make it configurable from the cmake command line.
2024-06-21 14:31:52 -05:00
Pontus Oldberg
5118b4aae8
Adds support for the iLabs opendec02 decoder. (#1667) 2024-06-21 14:31:04 -05:00
Andrew Scheller
cea8211834
Fix FIFO size in Doxygen in hardware/adc.h (#1720)
See https://github.com/raspberrypi/pico-feedback/issues/357
2024-06-21 14:30:13 -05:00
Andrew Scheller
5be87f1e22
Clarify that DMA timer fraction must be <= 1 (#1723) 2024-06-21 14:29:47 -05:00
Andrew Scheller
0e5cef3ffa
Boards header updates (#1724)
* Add script to automatically validate board header files

* Fix small automatically-found inconsistencies in various board header files

* Tweak and add board header file from abandoned PR #1174
2024-06-21 14:26:45 -05:00
Hiroyuki OYAMA
333974fd6c
Corrects errors in returning constant labels (#1735) 2024-06-21 14:24:44 -05:00
Peter Harper
a567349aae
Update btstack v1.6.1 (#1736)
* Update btstack to v1.6.1

* Add build changes for btstack v1.6.1
2024-06-21 14:23:50 -05:00
Peter Harper
f193ed6bc9
Update cyw43-driver to fix build warnings (#1739)
This resolves kitchensink build issues
2024-06-21 14:22:14 -05:00
J
c526ec1c3d
custom_(un)lock_tcpip_core: link properly in C++ (#1738) 2024-06-20 09:07:32 -05:00
armandomontanez
6ff3e4fab2
Expand bazel build to include configuration options and broader support. (#1731)
* Add host Bazel build

Updates target_compatible_with across the repo to ensure that wildcard
builds for both host and rp2040 succeed.

* Get unit tests building

* Add Python script to identify build system differences

Uses the build system tags to make it easier to identify differences
between the CMake and Bazel builds.

* Temporarily disable pico divider test

* Support PICO_BARE_METAL in Bazel

* Support PICO_NO_GC_SECTIONS in Bazel

* Support boot2 configuration in Bazel

Adds support for PICO_DEFAULT_BOOT_STAGE2 and
PICO_DEFAULT_BOOT_STAGE2_FILE in the Bazel build.

* Allowlist some CMake-only options

* Support CXX configuration options in Bazel

* Move multiple_choice_flag.bzl

* Support all pico boards

* Support linking multiple stdio implementations

Changes the Bazel build so stdio implementations are no longer mutually
exclusive.

* Add PICO_BOOT_STAGE2_LINK_IMAGE

* Support PICO_CMSIS_PATH in Bazel

* Support PICO_USE_DEFAULT_MAX_PAGE_SIZE in Bazel

* Silence PICO_CMSIS_VENDOR and PICO_CMSIS_DEVICE differences

* Support PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS in Bazel

* Properly support version defines

* Support embedding binary info in Bazel

* Embed build type in binary

* Support different linker scripts in Bazel build

* Finish out missing PICO_BUILD_DEFINE in Bazel build

* Support PICO_NO_TARGET_NAME

* Reorganize initial configuration options in Bazel

Cleans up and reorganizes some of the initial configuration options
added to the Bazel build so everything is consistent.

* Add builds for pioasm and elf2uf2

* Use Python rules from rules_python

* Actually link in output formats in pioasm tool

* Make tools have public visibility

* Add UF2 Bazel aspect

* Add TODOs for pioasm/uf2 helpers

* Fix compile flag typo

* Update Bazel SDK configuration strings to match recent CMake changes

* Fix pico_divider test

* Clean up straggling TODOs

* Clarify pico_stdio_test compatibility

* Initial Bazel Pico W support

* Add new files from develop

* Clean up compatibility expressions in Bazel build

* Clean up rp2 constraint handling in Bazel

* More Bazel docs cleanup

* Format Bazel build files

* Consolidate transitions in the Pico SDK

* Make every _allowlist_function_transition explicit

* More docs cleanup

* Add a few missing defines

* Improve PICO_CONFIG_HEADER correctness in Bazel

* Minor docs clarifications
2024-06-13 09:50:04 -05:00
Peter Harper
0dc17e5149
Update cyw43_driver to v1.0.3 (#1732) 2024-06-13 09:03:46 -05:00
Christian Halter
a391f641b6
Added Newsan's Archi board (#1730)
Co-authored-by: Christian Halter <christian.halter@newsan.com.ar>
2024-06-12 13:42:25 -05:00
Peter Harper
a456964c19
Fix btstack compilation (#1726)
hardware/flash.h has been removed from pico/flash.h in the fix
for #1699. This breaks btstack compilation. Let's fix it.
2024-06-10 10:03:09 -05:00
Ahmet Kizilay
3ee062318f
set git tag for the SDK (#1630)
with this change we can use PICO_SDK_FETCH_GIT_TAG to specify a release tag for the Pico SDK to download.

example usage:
```
set(PICO_SDK_FETCH_FROM_GIT true)
set(PICO_SDK_FETCH_FROM_GIT_TAG "1.5.1")
include(pico_sdk_import.cmake)
```
2024-06-04 20:04:21 -05:00
Mykle
79977dbc4a
Update dma.h (#1678)
Fix inline doc for dma_timer_set_fraction()
2024-06-04 20:00:55 -05:00
J
e84eedff32
Remove unneeded includes from pico_flash. (#1699) 2024-06-04 19:59:59 -05:00
Andrew Scheller
115eae7c66
Add scripts to extract PICO_CMAKE_CONFIG and PICO_BUILD_DEFINE entries (#1708)
Tidy up a couple of PICO_CMAKE_CONFIG and PICO_BUILD_DEFINE entries
2024-06-04 19:59:28 -05:00
armandomontanez
abce1d427c
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel

Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.

* Bazel libraries to support picotool

* Move SDK defines to toolchain

* Switch to `archive_override` in MODULE.bazel

Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.

* Multiplatform objcopy selection in Bazel build

Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.

* Generate Bazel build files

Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.

* Fix dependency cycles in Bazel build

Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.

* Silence warning in pico_stdio Bazel build

Silences a stray warning in the Bazel build.

* Fix wildcard Bazel build

This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).

* Get the SDK working

Finishes out the remainder of the work required to successfully compile
a working blinky example.

* Fix UART stdio dependencies in Bazel build

Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.

* Add linux support to Bazel build

* Get Bazel deps from registry

Adds external an external registry for resolving Bazel module
dependencies.

* Fix host configuration for picotool

Provides the appropriate defines for host builds to support the picotool
build.

* Remove -ffreestanding from Bazel toolchain

The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.

* Remove unused .bzl file

* Reduce Bazel compiler flags

Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.

* Get USB serial working

Adds initial TinyUSB support and enough integration to get USB serial
working.

* Remove "Generated build file"

Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.

* Do not build USB libraries unless configured

Prevents USB libraries from being built unless the build is properly
configured to use them.

* Switch to rules_cc toolchains

Moves toolchain configuration to use the new rules in rules_cc.

* Minor cleanup in parse_version.py

Cleans up trailing whitespace and runs the black formatter on
parse_version.py.

* Simplify constraint dimensions in Bazel build

Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.

* Update pin of rules_cc in Bazel build

Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.

* Move toolchains from pico.bzl to BUILD.bazel

Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.

* Run buildifier on Bazel build files

Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.

* Make objcopy rule

Makes a simple objcopy rule to remove direct references to the ARM
toolchains.

* Fix link flags in Bazel build

Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.

* Mention missing host build support

* Fix various Bazel library rules

* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
  implementation.

* Extend Bazel build documentation

Improves documentation and comments across the Bazel build.

* Clean up auxilary tools in Bazel build

Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.

* Update boot_stage2 Bazel build file

Moves `includes` to be enumerated on the correct library.

* Add WORKSPACE version fallback

WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.

* Fix malloc handling in Bazel build

* Fix Bazel dependency cycle in pico_malloc

* Prevent malloc from being linked into boot_stage2

Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.

* Remove custom bootloader platform

A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-04 18:50:32 -05:00
dthomas981
23dec9d38c
Correct clk_sys auxsrc definition for XOSC (#1571) 2024-05-21 13:37:43 +01:00
Agustín Mista
f81537d9e0
Add board definition for Cytron Maker Pi RP2040 (#1473) 2024-05-19 19:49:27 -05:00
Andrew Scheller
a6c65b426d
Small kitchen-sink fixes (#1707)
- tweak CMakeLists.txt and kitchen_sink.c to be in a more similar order
- add some "missing" headers to kitchen_sink.c
2024-05-19 19:26:30 -05:00
Andrew Scheller
dcc2241a16
Add a script to create a header file including all other header files (#319) 2024-05-19 17:44:03 -05:00
Mr. Jake
3f41d7d2ee
Added comments referencing spin-lock lock/unlock read/writes (#1501) 2024-05-19 17:03:32 -05:00
Patrick Plenefisch
7d238ea2cc
[pioasm] Fix build warning due to extra parameters (#1625) 2024-05-19 16:48:53 -05:00
Peter Harper
0d56f52b7b
Add some missing i2c function documentation (#1650)
Add i2c_get_index for consistency - just calls i2c_hw_index
2024-05-19 16:36:27 -05:00