roll: zephyr 930898b..24ae278 (60 commits)

24ae278 dts: i2c: Simplify the description of the binding
7fc9c26 drivers: spi_nxp_lpspi: Fix slave select and add pcsActiveHighOrLow
183b74c driver: wifi: esp32: fix send event when not connected
f22de97 soc: esp32: riscv: fix interrupt allocator
fff5004 boards: nxp: Update USB testing label to point to usb_next
3d0a7da doc: ruuvi: adopt zephyr:board-supported-hw directive
f69f3ec doc: seco: adopt zephyr:board-supported-hw directive
839c143 doc: croxel: adopt zephyr:board-supported-hw directive
4b6215d doc: raytac: adopt zephyr:board-supported-hw directive
234e01c doc: weact: adopt zephyr:board-supported-hw directive
6715d46 doc: atmel: adopt zephyr:board-supported-hw directive
2b06051 doc: telink: adopt zephyr:board-supported-hw directive
e4b232d doc: infineon: adopt zephyr:board-supported-hw directive
87914ce doc: sipeed: adopt zephyr:board-supported-hw directive
3abd476 doc: vcc-gnd: adopt zephyr:board-supported-hw directive
5eadb6d doc: google: adopt zephyr:board-supported-hw directive
c9c7c33 doc: ezurio: adopt zephyr:board-supported-hw directive
a7c20a3 doc: ti: adopt zephyr:board-supported-hw directive
aef7c01 doc: rakwireless: adopt zephyr:board-supported-hw directive
0b6d480 doc: amd: adopt zephyr:board-supported-hw directive
ccfbe6d doc: dptechnics: adopt zephyr:board-supported-hw directive
49af074 doc: 01space: adopt zephyr:board-supported-hw directive
3875095 doc: bcdevices: adopt zephyr:board-supported-hw directive
ff655e4 doc: ct: adopt zephyr:board-supported-hw directive
6d53749 doc: microchip: adopt zephyr:board-supported-hw directive
e114c1f doc: waveshare: adopt zephyr:board-supported-hw directive
6ba17b3 doc: segger: adopt zephyr:board-supported-hw directive
fe071d6 doc: makerbase: adopt zephyr:board-supported-hw directive
db2b9cd doc: silabs: adopt zephyr:board-supported-hw directive
8368d47 doc: openisa: adopt zephyr:board-supported-hw directive
3bc3340 doc: mikroe: adopt zephyr:board-supported-hw directive
2d348b1 doc: vngiotlab: adopt zephyr:board-supported-hw directive
7f49f20 doc: fanke: adopt zephyr:board-supported-hw directive
dba653c doc: seagate: adopt zephyr:board-supported-hw directive
4ca947a doc: heltec: adopt zephyr:board-supported-hw directive
39ec0d0 doc: beagle: adopt zephyr:board-supported-hw directive
13eb012 doc: st: adopt zephyr:board-supported-hw directive
110b197 doc: innblue: adopt zephyr:board-supported-hw directive
f5fc14a doc: adafruit: adopt zephyr:board-supported-hw directive
9b557bb doc: raspberrypi: adopt zephyr:board-supported-hw directive
c13fb3b doc: gd: adopt zephyr:board-supported-hw directive
66376e6 doc: gardena: adopt zephyr:board-supported-hw directive
7a6127c doc: ambiq: adopt zephyr:board-supported-hw directive
6662bf6 doc: hardkernel: adopt zephyr:board-supported-hw directive
364dfbf doc: ene: adopt zephyr:board-supported-hw directive
0a82a3b doc: fysetc: adopt zephyr:board-supported-hw directive
49445c8 doc: madmachine: adopt zephyr:board-supported-hw directive
e3d15df doc: we: adopt zephyr:board-supported-hw directive
3227d78 doc: nuvoton: adopt zephyr:board-supported-hw directive
00d6974 doc: contextualelectronics: adopt zephyr:board-supported-hw directive
245d8e3 doc: firefly: adopt zephyr:board-supported-hw directive
2ceba0f doc: m5stack: adopt zephyr:board-supported-hw directive
97f63fb doc: realtek: adopt zephyr:board-supported-hw directive
8d96de7 doc: espressif: adopt zephyr:board-supported-hw directive
46e5c5c doc: quicklogic: adopt zephyr:board-supported-hw directive
9973fe2 doc: olimex: adopt zephyr:board-supported-hw directive
488312f doc: renesas: adopt zephyr:board-supported-hw directive
b6c656e doc: khadas: adopt zephyr:board-supported-hw directive
c9a9647 doc: Update direct ISR documentation
5595de3 samples: usb: uac2: Warn about Windows driver issues

Rolled-Repo: https://pigweed.googlesource.com/third_party/github/zephyrproject-rtos/zephyr
Rolled-Commits: 930898b49d5633..24ae27801f14f6
Roll-Count: 1
Roller-URL: https://cr-buildbucket.appspot.com/build/8721159346909036753
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I23a6e0e8c27eaf757bf8615de9ee27b433c4032e
Reviewed-on: https://pigweed-review.googlesource.com/c/zephyr/zephyr-bazel/+/273215
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
1 file changed
tree: 3f5b422e33f9abe8dda984b847dbd46b99eacfd2
  1. .vscode/
  2. arch/
  3. boards/
  4. drivers/
  5. dts/
  6. examples/
  7. include/
  8. kernel/
  9. lib/
  10. modules/
  11. scripts/
  12. soc/
  13. subsys/
  14. AUTHORS
  15. BUILD.bazel
  16. cc.bzl
  17. CONTRIBUTING.md
  18. defs.bzl
  19. generate_diff.py
  20. LICENSE
  21. MODULE.bazel
  22. MODULE.bazel.lock
  23. OWNERS
  24. README.md
  25. setup.bzl
  26. WORKSPACE
README.md

Zephyr-Bazel

The way this repository works is by overlaying itself on top of Zephyr. To get started, first make sure you have Bazel‘s skylib version 1.7.1 or greater. If you don’t have it, you can use:

http_archive(
    name = "bazel_skylib",
    sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
    ],
)

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

To grab the zephyr-bazel repo, use a git_repository rule in your WORKSPACE, such as:

git_repository(
    name = "zephyr-bazel",
    remote = "https://pigweed.googlesource.com/zephyr/zephyr-bazel"
    branch = "main",
)

Once you have @zephyr-bazel, we can load the patch rule to generate the Zephyr diff that will augment Zephyr to include the BUILD.zephyr rules.

load("@zephyr-bazel//:setup.bzl", "create_zephyr_patch_file")

create_zephyr_patch_file(
    name = "zephyr-patch",
    filename = "patch.diff",
    # This is optional, use it to see what's going on under the hood
    debug = True,
)

We now have a diff file at @zephyr-patch//:patch.diff. We're ready to load Zephyr.

git_repository(
    name = "zephyr",
    remote = "https://github.com/zephyrproject-rtos/zephyr.git",
    branch = "main",
    patches = [
        "@zephyr-patch//:patch.diff",
    ],
)

The final step will be to load Zephyr's python dependencies:

load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
    name = "py_deps",
    python_interpreter_target = interpreter,
    requirements_lock = "@@zephyr//:scripts/requirements-base.txt",
)

load("@py_deps//:requirements.bzl", zephyr_install_deps = "install_deps")

zephyr_install_deps()

Application

In your main application, you can now use the Zephyr utilities for building your app.

load("@zephyr//:defs.bzl", "dts_cc_library")

dts_cc_library(
    name = "app_native_sim_dts",
    dts_lib = "@zephyr//boards/native/native_sim:native_sim",
)

cc_binary(
    ...
    deps = [
        ...
        "@zephyr//:zephyr",
    ] + select({
        "@platform//cpu:x86_64": [
            ":app_native_sim_dts",
            "@zephyr//include:posix",
        ],
    }),
    copts = select({
        "@platform//cpu:x86_64": [
            "-DCONFIG_ARCH_POSIX=1",
        ],
    }),
)

Examples

There is currently just 1 example, you can run it via:

$ cd examples/hello_dts
$ bazel run :app

Or, you can run the tests via:

$ cd examples/hello_dts
$ bazel test //...