mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-09 23:04:37 +01:00
Compare commits
3 commits
dd6db57b9e
...
3755dae7a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3755dae7a1 | ||
|
|
a76f2416ba | ||
|
|
70c79464c0 |
2 changed files with 61 additions and 6 deletions
25
MODULE.bazel
25
MODULE.bazel
|
|
@ -16,7 +16,10 @@ http_archive(
|
|||
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",
|
||||
urls = [
|
||||
"https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz",
|
||||
"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
|
@ -24,7 +27,10 @@ http_archive(
|
|||
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
||||
sha256 = "6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb",
|
||||
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi",
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz",
|
||||
urls = [
|
||||
"https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz",
|
||||
"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
|
@ -32,7 +38,10 @@ http_archive(
|
|||
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
||||
sha256 = "51d933f00578aa28016c5e3c84f94403274ea7915539f8e56c13e2196437d18f",
|
||||
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi",
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip",
|
||||
urls = [
|
||||
"https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip",
|
||||
"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
|
@ -40,7 +49,10 @@ http_archive(
|
|||
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
||||
sha256 = "075faa4f3e8eb45e59144858202351a28706f54a6ec17eedd88c9fb9412372cc",
|
||||
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-darwin-x86_64-arm-none-eabi",
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz",
|
||||
urls = [
|
||||
"https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz",
|
||||
"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
|
@ -48,7 +60,10 @@ http_archive(
|
|||
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
||||
sha256 = "39c44f8af42695b7b871df42e346c09fee670ea8dfc11f17083e296ea2b0d279",
|
||||
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-darwin-arm64-arm-none-eabi",
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz",
|
||||
urls = [
|
||||
"https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz",
|
||||
"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "pico.h"
|
||||
#include "hardware/sync.h"
|
||||
|
||||
// PICO_CONFIG: PICO_USE_SW_SPIN_LOCKS, Use software implementation for spin locks, type=bool, default=1 on RP2350 due to errata, group=hardware_sync
|
||||
// PICO_CONFIG: PICO_USE_SW_SPIN_LOCKS, Use software implementation for spin locks, type=bool, default=1 on RP2350 due to errata E2, group=hardware_sync
|
||||
#ifndef PICO_USE_SW_SPIN_LOCKS
|
||||
#if PICO_RP2350
|
||||
#define PICO_USE_SW_SPIN_LOCKS 1
|
||||
|
|
@ -19,53 +19,93 @@
|
|||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_IRQ, Spinlock ID for IRQ protection, min=0, max=31, default=9, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_IRQ
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_IRQ 5
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_IRQ 9
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_TIMER, Spinlock ID for Timer protection, min=0, max=31, default=10, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_TIMER
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_TIMER 6
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_TIMER 10
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_HARDWARE_CLAIM, Spinlock ID for Hardware claim protection, min=0, max=31, default=11, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_HARDWARE_CLAIM
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 7
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_RAND, Spinlock ID for Random Number Generator, min=0, max=31, default=12, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_RAND
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_RAND 10
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_RAND 12
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_ATOMIC, Spinlock ID for atomics, min=0, max=31, default=13, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_ATOMIC
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_ATOMIC 11
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_ATOMIC 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_OS1, First Spinlock ID reserved for use by low level OS style software, min=0, max=31, default=14, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_OS1
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_OS1 18
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_OS1 14
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_OS2, Second Spinlock ID reserved for use by low level OS style software, min=0, max=31, default=15, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_OS2
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_OS2 19
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_OS2 15
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_STRIPED_FIRST, Lowest Spinlock ID in the 'striped' range, min=0, max=31, default=16, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_STRIPED_FIRST
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_STRIPED_FIRST 20
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_STRIPED_FIRST 16
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_STRIPED_LAST, Highest Spinlock ID in the 'striped' range, min=0, max=31, default=23, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_STRIPED_LAST
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_STRIPED_LAST 25
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_STRIPED_LAST 23
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Lowest Spinlock ID in the 'claim free' range, min=0, max=31, default=24, group=hardware_sync
|
||||
#ifndef PICO_SPINLOCK_ID_CLAIM_FREE_FIRST
|
||||
#if PICO_RP2350 && !PICO_USE_SW_SPIN_LOCKS
|
||||
#define PICO_SPINLOCK_ID_CLAIM_FREE_FIRST 26
|
||||
#else
|
||||
#define PICO_SPINLOCK_ID_CLAIM_FREE_FIRST 24
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PICO_SPINLOCK_ID_CLAIM_FREE_END
|
||||
#warning PICO_SPINLOCK_ID_CLAIM_FREE_END has been renamed to PICO_SPINLOCK_ID_CLAIM_FREE_LAST
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue