Skip to content

Update to 2.1.0 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 158 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
f4a691a
Update doxygen group for clock functions (#1808)
lurch Aug 12, 2024
8177366
bump version for sdk 2.0.1-develop
kilograham Aug 14, 2024
424e21e
#1788 fix missing static_assert message
kilograham Aug 14, 2024
a2642f9
.gitignore: Add .cache (#1825)
jaguilar Aug 15, 2024
e049f50
Support serial flash with 16 byte unique id (#1819)
peterharperuk Aug 15, 2024
a6f21b6
Include Platform Paths files for the host (#1826)
will-v-pi Aug 15, 2024
7a0f1f0
#1829 .HEX files missing since SDK2.0.0
kilograham Aug 15, 2024
b271208
Delete tools/copro_dis.py (#1833)
lurch Aug 16, 2024
62df126
#1805 fix merge issue in pico_atomic which ended up with using IRQ di…
kilograham Aug 19, 2024
cd71c89
Fix missing Binary Info for boot_stage2 (#1844)
kilograham Aug 19, 2024
8886f27
Fix Windows CI build (#1846)
will-v-pi Aug 19, 2024
fab47c8
Fix Cmsis irq regression (#1821)
kilograham Aug 20, 2024
9430469
Revert "Delete tools/copro_dis.py (#1833)"
kilograham Aug 20, 2024
e930bf3
Deprecate copro_dis.py - keep for now as it is used by bootrom build
kilograham Aug 20, 2024
789ea75
Ensure makefsdata.py generates valid variable names (#1841)
ndabas Aug 20, 2024
7be79e8
Fix picobin inclusion from assembler with NO_PICO_PLATFORM (#1832)
will-v-pi Aug 20, 2024
1bdd006
Small doxygen fixes (#1828)
lurch Aug 20, 2024
9a41722
More board header checks (#1814)
lurch Aug 20, 2024
fa88c12
Update aon_timer.h (#1809)
eltociear Aug 20, 2024
eaaa4a5
typo in documentation of __time_critical_func (#1792)
dgoffredo Aug 20, 2024
19d5f4c
Add board definition for Adafruit Feather 2350 (#1784)
tannewt Aug 20, 2024
eba6adb
#1851 fix signature of hardware_alarm_get_irq_num (#1852)
kilograham Aug 20, 2024
4a27277
Disable interrupts while doing flash_op, explicit_buy, and chain_imag…
will-v-pi Aug 22, 2024
4cb5c1c
bazel build: Fix compilation bugs for Pico-W support (#1797)
jaguilar Aug 22, 2024
598ba01
Add build-essential to README command line install (#1859)
will-v-pi Aug 22, 2024
9b16c79
Reorder pins in bi_pins_with_names to work with mask (#1858)
will-v-pi Aug 22, 2024
7dc10d7
Bazel: disable link_extra_lib when building bootloader (#1854)
cramertj Aug 22, 2024
aa8cf17
Fix assert in gpio_set_irq_enabled (#1864)
peterharperuk Aug 23, 2024
7d5d927
Workaround gcc/newlib issue on Ubuntu 24 (#1863)
lurch Aug 23, 2024
bc598ff
Fix #1861 - MAX_EXCEPTION_NUM is the highest number, so check should …
will-v-pi Aug 24, 2024
a46addb
Fix stdio_usb with reset interface disabled on Windows (#1857)
will-v-pi Aug 24, 2024
a700b77
Small pico_pre_load_platform.cmake tweak (#1867)
lurch Aug 24, 2024
d639292
Update extract configs (#1845)
lurch Aug 27, 2024
dd4aacb
fix linker script bug using ALL of RAM (#1872)
kilograham Aug 27, 2024
a2a4c20
Don't run coprodis on Risc-V or RP2040 binaries (#1875)
will-v-pi Aug 27, 2024
4bbf701
bootrom build includes pico_bootrom but not bootrom.h which is the on…
kilograham Aug 28, 2024
2d60604
Revert "bootrom build includes pico_bootrom but not bootrom.h which i…
kilograham Aug 28, 2024
91864a0
fix bug in sm_config_set_in_pin_count (#1880)
kilograham Aug 29, 2024
ff5401f
separate actual shared bootrom header into boot_bootrom_headers, as p…
kilograham Aug 30, 2024
876f331
bump picotool to the develop branch (#1886)
kilograham Aug 30, 2024
d886df6
Add fast single-precision add/sub/mul for Hazard3 (#1883)
Wren6991 Aug 30, 2024
3cb21c8
pico_bootrom: bootrom.h: fix -Wstrict-prototypes (#1888)
KarlK90 Aug 30, 2024
3bc8663
Adding I2C Burst Reading/Writing feature (#1495)
AnhNhan2803 Aug 30, 2024
b98970f
PIO doxygen typo (#1894)
lurch Sep 1, 2024
d957c73
Add RP2350 PicoADK variant (#1787)
DatanoiseTV Sep 1, 2024
b3cadb7
fix RISC-V build
kilograham Sep 1, 2024
f13306c
Fix typo in documentation of PICO_RAND_ENTROPY_SRC_TRNG (#1794)
Dranoel2 Sep 3, 2024
dfb5738
Use lib instead of CMAKE_INSTALL_LIBDIR for pioasm install (#1865)
will-v-pi Sep 3, 2024
3a79149
Fix a compile error by using clang-x86_64-pc-windows-msvc (#1890)
kkitayam Sep 5, 2024
b49d4ec
Fix Bazel build breakages (#1908)
armandomontanez Sep 10, 2024
398ac2b
Some small fixes/improvements for pico_minimize_runtime (#1919)
kilograham Sep 10, 2024
0f38151
[Bazel] Update version string to 2.0.1-develop (#1885)
armandomontanez Sep 10, 2024
f12ac1c
RISC-V inline assembly constraints fix - platform.h (#1923)
iCMDdev Sep 11, 2024
ec0037b
Enable building with Bazel on Raspberry PI OS machines (#1921)
seesturm Sep 11, 2024
0ed2840
boot_stage2: improve reproducibility (#1907)
tpwrules Sep 11, 2024
42e234f
#1909 fix system_RP2350 typos (#1910)
metebalci Sep 11, 2024
6500c59
Add busy_wait_at_leasy_cycles to host (#1925)
kilograham Sep 11, 2024
af2f426
Changes for pico2_w (#1816)
peterharperuk Sep 18, 2024
780817a
Fix comments next to `enum gpio_irq_level` values. (#1928)
dgoffredo Sep 18, 2024
d08f36c
fix assertion failure in rp2350_chip_version
kilograham Sep 20, 2024
9f56a47
Avoid setting an alarm in the past (#1954)
peterharperuk Sep 26, 2024
a0f828f
Fix doxygen typo (#1945)
lurch Sep 28, 2024
0e5ef0f
Fix hardware_alarm_irq_handler when using Timer 1 (#1949)
ajf58 Sep 28, 2024
8c08f2b
Export linker scripts in the bazel build. (#1944)
davexroth Sep 28, 2024
66335f1
Clarify that RP2350 gets its unique id from OTP (#1942)
peterharperuk Sep 28, 2024
20cf711
removed dangling #ifdef __cplusplus (#1941)
theMladyPan Sep 28, 2024
78533ec
Specify minimum cmake version for generic_board.cmake (#1879)
lurch Sep 28, 2024
ff373b3
Fixes #1891 Update pico_configure_ip4_address comments (#1892)
mattmyne Sep 28, 2024
075e829
Update i2c_slave.c: clock stretching comment fix (#1811)
giampiero7 Sep 28, 2024
e2e0fd5
remove support for A0 & A1 versions of RP2350 (#1958)
kilograham Sep 30, 2024
cf8301f
Doc fix for aon_timer on RP2350 (#1960)
kholia Sep 30, 2024
bd5523c
Improve best_effort_wfe_or_timeout (#1822)
kilograham Sep 30, 2024
761bb1d
hellbender_0001 board file (#1957)
CBJamo Sep 30, 2024
c675dfe
fix mis-spelling of PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK (#1966)
kilograham Oct 1, 2024
fa91723
Update hellbender_0001.h (#1967)
chrisboross Oct 1, 2024
03a82f3
Update Clang toolchain used by Bazel (#1976)
petrhosek Oct 12, 2024
07d6dc1
[Bazel] Fix bazel build, add presubmit (#1973)
armandomontanez Oct 12, 2024
66c7f0f
Move cyw32 pin definitions (#1982)
peterharperuk Oct 17, 2024
91dfbd0
Fix issue with free rtos execute sync (#1979)
peterharperuk Oct 17, 2024
3708588
Add RP2350 specific values to the exception_number enum (#1988)
davexroth Oct 17, 2024
98c114a
Updated hardware/pio.h to correct the comment for the third (PIO 2) h…
thehugh100 Nov 4, 2024
5032223
boards/pimoroni_plasma2350.h: correct flash size. (#2015)
Gadgetoid Nov 4, 2024
37c6b24
Add missing instruction to vestigial copro_dis.py (#2018)
kilograham Nov 5, 2024
8905de5
Add missing instruction to vestigial copro_dis.py (#2018)
kilograham Nov 5, 2024
bd130ed
Remove code bloat in public SDK for 64K roms (#2016)
kilograham Nov 5, 2024
d649c6c
Add some tests (#1978)
peterharperuk Nov 5, 2024
e48a2e1
[Bazel] Update rules_cc to v0.0.10 (#1989)
armandomontanez Nov 5, 2024
ca0c0db
Fix GCC14.1 compile error in w25x10cls.S (#2000)
earlephilhower Nov 5, 2024
11961b9
Very minor typos in contributing.md (#1939)
earlephilhower Nov 5, 2024
6587f5c
Add the required `SYS_CLK_HZ` definition to the suggested cmake outpu…
andygpz11 Nov 6, 2024
809a423
Fix some header dependencies (#2031)
peterharperuk Nov 9, 2024
2331e6f
Fix dependency on files used by picotool (#2027)
will-v-pi Nov 9, 2024
1aa049f
update glibc header sys/cdefs.h include guard (#2029)
dasimmet Nov 9, 2024
4196f2c
Avoid hang in stdio_set_chars_available_callback (#2020)
peterharperuk Nov 9, 2024
750bfae
Mesh support (#2001)
peterharperuk Nov 9, 2024
5c6fece
Minor header cleanups and ASM compatibility (#2019)
kilograham Nov 9, 2024
f642b76
Move CYW43-related PICO_CONFIG lines to cyw43_driver.h (#2002)
lurch Nov 9, 2024
4726a56
Update cyw43-driver to latest main. (#2032)
peterharperuk Nov 11, 2024
68778b1
Clear i2c abort reason less often. (#2026)
peterharperuk Nov 11, 2024
c7e5626
add support for machdyne werkzeug rp2040 board (#2023)
machdyne Nov 11, 2024
09a9379
Add explicit alignment for embedded_end_block (#2017)
kilograham Nov 11, 2024
f9eb48b
Add XIP cache maintenance API (fixes #2005) (#2013)
Wren6991 Nov 11, 2024
06b7c1c
Change div_int_frac methods to be suffixed by the number of bits of f…
kilograham Nov 12, 2024
1b64cac
Extend build system checks (#2039)
armandomontanez Nov 13, 2024
0f847db
Remove ARM assembly from RISC-V CYW43 SPI PIO (#2045)
earlephilhower Nov 18, 2024
d0db378
Fix typo in rom_get_partition_table_info doxygen (#2041)
lurch Nov 18, 2024
d6e3fa0
Fixes to picolibc_interface (#1795)
gneverov Nov 18, 2024
7ceca31
PPP2 and Plasma2350: SPICE to SPCE. (#2048)
Gadgetoid Nov 18, 2024
fe018f9
Add SparkFun ThingPlus RP2350 (#2038)
sfe-SparkFro Nov 18, 2024
8d1378d
Remove Segger RTT from pico-btstack (#1995)
peterharperuk Nov 18, 2024
37e4257
bump macOS build action to macos-latest from deprecated macos-12
kilograham Nov 18, 2024
11e7801
Remove repeated source file from pico_btstack (#2042)
armandomontanez Nov 18, 2024
89691ed
Do not assume submodule root directory in presubmit (#2040)
armandomontanez Nov 18, 2024
5f6c432
Fix minor uninitialized warnings from G++ 12.3.0 (#1786)
earlephilhower Nov 19, 2024
35fcc34
Clocks doxygen: Remove incorrect clk_ref auxsrc value LPOSC. LPOSC is…
liamfraser Nov 19, 2024
363302f
Move to TinyUSB release 0.17.0 (#2053)
liamfraser Nov 19, 2024
b122c42
More CYW43 config tweaks (#2033)
lurch Nov 19, 2024
482dd59
Abilty to limit iterations in hci processing loop (#1998)
peterharperuk Nov 19, 2024
e99c43b
fix method name spelling (#2057)
kilograham Nov 19, 2024
c4b55f6
Fix the name of a PICO_CMAKE_CONFIG (#2061)
lurch Nov 20, 2024
2a4dbd9
Small comment typo (#2064)
lurch Nov 20, 2024
08bf6a7
use configured uart_instance rather than default instance for flushin…
kilograham Nov 20, 2024
c2118cc
allow PICO_CORE1_STACK_SIZE=0 (#2058)
kilograham Nov 20, 2024
06a244b
fix incorrect disassembly of MOV rx_fifo (#2067)
kilograham Nov 20, 2024
46283dd
github action upgrades (#2075)
kilograham Nov 20, 2024
54d4f3a
Add some missing pio functions (#2074)
peterharperuk Nov 20, 2024
d3080e7
Slight tweak to the config-extraction scripts. (#2070)
lurch Nov 20, 2024
74db3c2
Update work area size from 3064 to 3264, and recommend 3.25K (#2073)
will-v-pi Nov 20, 2024
9a2b75e
prevent early macro expansion in PICOBIN_..._AS_BITS() macros (#2068)
kilograham Nov 20, 2024
6bf5d9b
Enforce ordering of pico_add_extra_outputs and picotool functions (#2…
will-v-pi Nov 20, 2024
105a2b8
Update pwm.h (#2077)
newbrain Nov 21, 2024
e17a82d
Change __always_inline to __force_inline to suppress GCC errors (#2078)
lurch Nov 21, 2024
f3459a4
Update documented max PIN values, to accomodate RP2350B (#2072)
lurch Nov 21, 2024
31c1be5
make panic loop back to breakpoint FWIW, and remove spurious header (…
kilograham Nov 21, 2024
90bfb53
provide slightly meaningless _start symbol for boot_stage2 to make LL…
kilograham Nov 21, 2024
36fefb5
Implement pico_bootsel_via_double_reset with the POWMAN DOUBLE_TAP fl…
Wren6991 Nov 21, 2024
8970241
Fix flash_safe_execute timeout under FreeRTOS (#2021)
jackwilsdon Nov 21, 2024
6bb3ccf
some minor pioasm fixes for #1950 (#2056)
kilograham Nov 21, 2024
5a98889
add rom_reset_usb_boot_extra which supports >32 pins and ACTIVE_LOW; …
kilograham Nov 21, 2024
6bb44dd
Make all float->int/frac conversions round to nearest by default (#2065)
kilograham Nov 21, 2024
9762b00
disable all IRQs in dma_chanel_cleanup - fixes for RP2350 (#2060)
kilograham Nov 21, 2024
7b07b0b
Save/restore QMI window 1 registers across calls to flash_exit_xip().…
Wren6991 Nov 21, 2024
08ea1d8
prevent self-deadlock with PICOLIBC due to calloc/realloc internally …
kilograham Nov 21, 2024
338f99f
Initial Pico/2 W Bazel support (#2049)
armandomontanez Nov 21, 2024
2692d9a
Propogate changed pico_cmake_set_default values to the compilation (#…
will-v-pi Nov 21, 2024
3dce58f
support both struct timespec and struct tm variants of the aon timer …
kilograham Nov 22, 2024
39a7f97
Cleanup/clarification of PIO behavior with >32 pins (#2085)
kilograham Nov 22, 2024
65d118c
RISC-V __mulsf3: handle exponent increase due to rounding (#2086)
Wren6991 Nov 23, 2024
3c39eec
Fix CMake build. (#2088)
yh-sb Nov 23, 2024
a6ae2e6
Fix compilation warnings (#2089)
kilograham Nov 23, 2024
5f607a9
Comment out CMake cyw43 vars which aren't really that useful in gener…
kilograham Nov 24, 2024
58e253c
Fix implicit declaration warning (#2093)
yh-sb Nov 25, 2024
b7e255d
Add board file for Pimoroni Pico Plus 2 W (#2092)
gonzalolarralde Nov 25, 2024
2a1e1af
Add missing CYW43_DEFAULT_PIN_WL_CS to pimoroni_pico_plus2_w_rp2350.h
kilograham Nov 25, 2024
beb2449
Update picotool dependency to 2.1.0 (not strictly required, but we pr…
kilograham Nov 25, 2024
95ea6ac
SDK 2.1.0 release
kilograham Nov 25, 2024
9c7a841
Merge tag '2.1.0' into merge-2.1.0
soburi Dec 7, 2024
cd8d517
pico-sdk: Disabling bazel build
soburi Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Required for new toolchain resolution API.
build --incompatible_enable_cc_toolchain_resolution
build --@rules_cc//cc/toolchains:experimental_enable_rule_based_toolchains

# Silence all C/C++ warnings in external code.
common --per_file_copt=external/.*@-w
common --host_per_file_copt=external/.*@-w
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/bazel_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Bazel presubmit checks

# Disable build in zephyr repository
# on:
# push:
# pull_request:

jobs:
bazel-build-check:
strategy:
matrix:
# TODO: Windows is currently broken.
os: [ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Bazel
uses: bazel-contrib/setup-bazel@0.9.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
# Only needed to drive the presbumit scripts.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Fetch latest Picotool
uses: actions/checkout@v4
with:
repository: raspberrypi/picotool
ref: develop
fetch-depth: 0
path: lib/picotool
- name: Full Bazel build with develop Picotool
run: python3 tools/run_all_bazel_checks.py --program=build --picotool-dir=lib/picotool
# Checks that the current BCR-requested version of Picotool builds.
- name: Bazel Picotool backwards compatibility
run: bazel build @picotool//:picotool
other-bazel-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Bazel
uses: bazel-contrib/setup-bazel@0.9.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
# Only needed to drive the presbumit scripts.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Fetch latest Picotool
uses: actions/checkout@v4
with:
repository: raspberrypi/picotool
ref: develop
fetch-depth: 0
path: lib/picotool
- name: Other Bazel checks
run: python3 tools/run_all_bazel_checks.py --program=other --picotool-dir=lib/picotool
2 changes: 1 addition & 1 deletion .github/workflows/choco_packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="gcc-arm-embedded" version="10.2.1" />
<package id="cmake" version="3.25.2" installArguments="ADD_CMAKE_TO_PATH=System" />
<package id="cmake" version="3.31.0" installArguments="ADD_CMAKE_TO_PATH=System" />
<package id="mingw" version="12.2.0" />
<package id="ninja" version="1.11.1" />
</packages>
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
mkdir -p "${{ github.workspace }}"

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:

jobs:
build:
runs-on: macos-12
runs-on: macos-latest
steps:
- name: Clean workspace
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multi-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
mkdir -p "${{ github.workspace }}"

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/generate_multi_gcc_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
mkdir -p "${{ github.workspace }}"

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ jobs:
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}/pico-sdk"
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init
- name: Install dependencies
run: choco install .github/workflows/choco_packages.config

- name: Build Project
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
shell: bash
shell: pwsh
run: |
mkdir build
cd build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea
.vscode
cmake-*
.cache
.DS_Store
build
build-*
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ If you are contributing new or updated code please match the existing code style

### Licensing

Code in this repository is lisensed under the [BSD-3 License](LICENSE.TXT). By contributing content to this repository you are agreeing to place your contributions under this licence.
Code in this repository is licensed under the [BSD-3 License](LICENSE.TXT). By contributing content to this repository you are agreeing to place your contributions under this license.
2 changes: 2 additions & 0 deletions ChangeLog.zephyr.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Need to take care to not break these changes when updating pico-sdk.

## Patch List:
- [#10] pico-sdk: Disabling bazel build
- .github/workflows/bazel_build.yml
- [#9] pico-sdk: Disabling sanity check the IRQ status
- src/rp2_common/hardware_gpio/gpio.c
- [#8] pico-sdk: pico_platform_compiler: Do not redefine `__weak`
Expand Down
95 changes: 52 additions & 43 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
module(
name = "pico-sdk",
version = "2.0.0",
version = "2.1.0",
)

bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "rules_python", version = "0.22.1")
bazel_dep(name = "picotool", version = "2.0.0")
bazel_dep(name = "rules_python", version = "0.36.0")
bazel_dep(name = "picotool", version = "2.1.0")
bazel_dep(name = "rules_cc", version = "0.0.10")

# Note: rules_cc is special-cased repository; a dependency on rules_cc in a
# module will not ensure that the root Bazel module has that same version of
# rules_cc. For that reason, this primarily acts as a FYI. You'll still need
# to explicitly list this dependency in your own project's MODULE.bazel file.
bazel_dep(name = "rules_cc", version = "0.0.9")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# rules_cc v0.0.10 is not yet cut, so manually pull in the desired version.
# This does not apply to dependent projects, so it needs to be copied to your
# project's MODULE.bazel too.
archive_override(
module_name = "rules_cc",
integrity = "sha256-zdQo/pQWKdIAPKSflBxOSWZNwCbc86T7SechKZo/3Xw=",
strip_prefix = "rules_cc-1acf5213b6170f1f0133e273cb85ede0e732048f",
urls = "https://github.com/bazelbuild/rules_cc/archive/1acf5213b6170f1f0133e273cb85ede0e732048f.tar.gz",
http_archive(
name = "arm_gcc_linux-aarch64",
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
sha256 = "8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a",
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-eabi",
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz",
)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "arm_gcc_linux-x86_64",
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
Expand Down Expand Up @@ -61,73 +54,73 @@ http_archive(
http_archive(
name = "clang_linux-x86_64",
build_file = "//bazel/toolchain:clang.BUILD",
sha256 = "e12ee0db9226f5b4a4400c5eb2c0f757d7056181b651622b5453acb00105fd87",
sha256 = "6c599d1aba568236064c340d7813324849896d5a4e2f3fd8225a8c31bfcbf884",
type = "zip",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/linux-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/linux-amd64/+/git_revision:2b0a708f41dd6291ee744704d43febc975e3d026",
)

http_archive(
name = "clang_win-x86_64",
build_file = "//bazel/toolchain:clang.BUILD",
sha256 = "8c41e8b507f4dfede80842f98a716cac209f552064088fa1b7f4c64a1e547534",
sha256 = "f49ba4123ee3958f2b47289d017a5b3f1ca01f82dd7a2168c45412c18101fd13",
type = "zip",
# Windows doesn't like `:` in the produced filename, so replace it with `%3A`.
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/windows-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799".replace("git_revision:", "git_revision%3A"),
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/windows-amd64/+/git_revision:2b0a708f41dd6291ee744704d43febc975e3d026".replace("git_revision:", "git_revision%3A"),
)

http_archive(
name = "clang_mac-x86_64",
build_file = "//bazel/toolchain:clang.BUILD",
sha256 = "1d92f52609d3c1e958fd56f5e9a68ab99b2042ddcc6e90a5eb5009cf7ac4897d",
sha256 = "d3516f2eb4c12d17ae77ee84c9226fbea581d4fb806910ceac4717d5adfcf748",
type = "zip",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-amd64/+/git_revision:2b0a708f41dd6291ee744704d43febc975e3d026",
)

http_archive(
name = "clang_mac-aarch64",
build_file = "//bazel/toolchain:clang.BUILD",
sha256 = "53184680db7e0043a8fba1556c7644b8f5e6c8cdffa4436a92a8e8adb0f45b8d",
sha256 = "68e551f41c7e9473063b09819f6ab8ec6e7e53677f4078189656cb14dc52984b",
type = "zip",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-arm64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-arm64/+/git_revision:2b0a708f41dd6291ee744704d43febc975e3d026",
)

new_git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")

# TODO: Provide tinyusb as a proper Bazel module.
http_archive(
new_git_repository(
name = "tinyusb",
build_file = "//src/rp2_common/tinyusb:tinyusb.BUILD",
sha256 = "d64728aef58b80d5ce3747cad133f520da46e2b7ea3aadfda0e981aba6b658b3",
strip_prefix = "tinyusb-4232642899362fa5e9cf0dc59bad6f1f6d32c563",
url = "https://github.com/hathach/tinyusb/archive/4232642899362fa5e9cf0dc59bad6f1f6d32c563.tar.gz",
commit = "5217cee5de4cd555018da90f9f1bcc87fb1c1d3a", # keep-in-sync-with-submodule: lib/tinyusb
remote = "https://github.com/hathach/tinyusb.git",
)

# TODO: Provide btstack as a proper Bazel module.
http_archive(
new_git_repository(
name = "btstack",
build_file = "//src/rp2_common/pico_btstack:btstack.BUILD",
sha256 = "64e86d9cf82b346e743fe1d4818b9380712b17abdb3f2c3524e92464b5ef3d19",
strip_prefix = "btstack-2b49e57bd1fae85ac32ac1f41cdb7c794de335f6",
url = "https://github.com/bluekitchen/btstack/archive/2b49e57bd1fae85ac32ac1f41cdb7c794de335f6.tar.gz",
commit = "2b49e57bd1fae85ac32ac1f41cdb7c794de335f6", # keep-in-sync-with-submodule: lib/btstack
remote = "https://github.com/bluekitchen/btstack.git",
)

# TODO: Provide btstack as a proper Bazel module.
http_archive(
# TODO: Provide cyw43-driver as a proper Bazel module.
new_git_repository(
name = "cyw43-driver",
build_file = "//src/rp2_common/pico_cyw43_driver:cyw43-driver.BUILD",
sha256 = "0fcc7707fef95dd562d5572604713266613a27caeeae2f10afeccee9592a53ce",
strip_prefix = "cyw43-driver-faf36381bad1f668a30172b6336c9a970966ef4c",
url = "https://github.com/georgerobotics/cyw43-driver/archive/faf36381bad1f668a30172b6336c9a970966ef4c.tar.gz",
commit = "cf924bb04c8984675ca0fc2178f082e404e048c3", # keep-in-sync-with-submodule: lib/cyw43-driver
remote = "https://github.com/georgerobotics/cyw43-driver.git",
)

# TODO: Provide lwip as a proper Bazel module.
http_archive(
new_git_repository(
name = "lwip",
build_file = "//src/rp2_common/pico_lwip:lwip.BUILD",
sha256 = "72856d557f72911cf6826ef745c23c54822df83a474557823241164a1d1361aa",
strip_prefix = "lwip-0a0452b2c39bdd91e252aef045c115f88f6ca773",
url = "https://github.com/lwip-tcpip/lwip/archive/0a0452b2c39bdd91e252aef045c115f88f6ca773.tar.gz",
commit = "0a0452b2c39bdd91e252aef045c115f88f6ca773", # keep-in-sync-with-submodule: lib/lwip
remote = "https://github.com/lwip-tcpip/lwip.git",
)

register_toolchains(
"//bazel/toolchain:linux-aarch64-rp2040",
"//bazel/toolchain:linux-aarch64-rp2350",
"//bazel/toolchain:linux-x86_64-rp2040",
"//bazel/toolchain:linux-x86_64-rp2350",
"//bazel/toolchain:win-x86_64-rp2040",
Expand All @@ -139,3 +132,19 @@ register_toolchains(
# Require users to opt-in to the Pico SDK's toolchains.
dev_dependency = True,
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = True,
python_version = "3.9",
)

use_repo(python, "pythons_hub")
register_toolchains(
"@pythons_hub//:all",
dev_dependency = True,
)
register_toolchains(
"@rules_python//python/runtime_env_toolchains:all",
dev_dependency = True,
)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ You can install the [Raspberry Pi Pico Visual Studio Code extension](https://mar
These instructions are extremely terse, and Linux-based only. For detailed steps,
instructions for other platforms, and just in general, we recommend you see [Raspberry Pi Pico-Series C/C++ SDK](https://rptl.io/pico-c-sdk)

1. Install CMake (at least version 3.13), and a GCC cross compiler
1. Install CMake (at least version 3.13), python 3, a native compiler, and a GCC cross compiler
```
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
sudo apt install cmake python3 build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
```
1. Set up your project to point to use the Raspberry Pi Pico SDK

Expand Down Expand Up @@ -200,4 +200,4 @@ instructions for other platforms, and just in general, we recommend you see [Ras

# RISC-V support on RP2350

See [Raspberry Pi Pico-series C/C++ SDK](https://rptl.io/pico-c-sdk) for information on setting up a build environment for RISC-V on RP2350.
See [Raspberry Pi Pico-series C/C++ SDK](https://rptl.io/pico-c-sdk) for information on setting up a build environment for RISC-V on RP2350.
Loading