|  | # Copyright 2023 The Pigweed Authors | 
|  | # | 
|  | # Licensed under the Apache License, Version 2.0 (the "License"); you may not | 
|  | # use this file except in compliance with the License. You may obtain a copy of | 
|  | # the License at | 
|  | # | 
|  | #     https://www.apache.org/licenses/LICENSE-2.0 | 
|  | # | 
|  | # Unless required by applicable law or agreed to in writing, software | 
|  | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | 
|  | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | 
|  | # License for the specific language governing permissions and limitations under | 
|  | # the License. | 
|  |  | 
|  | module(name = "examples") | 
|  |  | 
|  | bazel_dep(name = "bazel_skylib", version = "1.7.1") | 
|  | bazel_dep(name = "freertos", version = "10.5.1.bcr.2") | 
|  | bazel_dep(name = "nanopb", version = "0.4.9.1", repo_name = "com_github_nanopb_nanopb") | 
|  | bazel_dep(name = "pico-sdk", version = "2.0.0") | 
|  | bazel_dep(name = "pigweed") | 
|  | bazel_dep(name = "platforms", version = "0.0.10") | 
|  | bazel_dep(name = "rules_cc", version = "0.0.17") | 
|  | bazel_dep(name = "rules_fuzzing", version = "0.5.2") | 
|  | bazel_dep(name = "rules_platform", version = "0.1.0") | 
|  | bazel_dep(name = "rules_python", version = "0.40.0") | 
|  |  | 
|  | local_path_override( | 
|  | module_name = "pigweed", | 
|  | path = "third_party/pigweed", | 
|  | ) | 
|  |  | 
|  | http_archive = use_repo_rule( | 
|  | "@bazel_tools//tools/build_defs/repo:http.bzl", | 
|  | "http_archive", | 
|  | ) | 
|  |  | 
|  | http_archive( | 
|  | name = "hal_driver", | 
|  | build_file = "@pigweed//third_party/stm32cube:stm32_hal_driver.BUILD.bazel", | 
|  | sha256 = "d0427a3830f0c23dd4810952321b8209be7b3c50897d1fc2d79587435cc3a379", | 
|  | strip_prefix = "stm32f4xx-hal-driver-1.8.0", | 
|  | urls = ["https://github.com/STMicroelectronics/stm32f4xx-hal-driver/archive/refs/tags/v1.8.0.tar.gz"], | 
|  | ) | 
|  |  | 
|  | http_archive( | 
|  | name = "cmsis_device", | 
|  | build_file = "@pigweed//third_party/stm32cube:cmsis_device.BUILD.bazel", | 
|  | sha256 = "1d9612ecaaab8708c88be2c9573927f2e5e9a911aa2c1427182b545ed5ed0fd6", | 
|  | strip_prefix = "cmsis-device-f4-2.6.8", | 
|  | urls = ["https://github.com/STMicroelectronics/cmsis-device-f4/archive/refs/tags/v2.6.8.tar.gz"], | 
|  | ) | 
|  |  | 
|  | http_archive( | 
|  | name = "cmsis_core", | 
|  | build_file = "@pigweed//third_party/stm32cube:cmsis_core.BUILD.bazel", | 
|  | sha256 = "32f226c31d7d1ff4a504404400603e047b99f405cd0c9a8f417f1f250251b829", | 
|  | strip_prefix = "cmsis-core-5.4.0_cm4", | 
|  | urls = ["https://github.com/STMicroelectronics/cmsis_core/archive/refs/tags/v5.4.0_cm4.tar.gz"], | 
|  | ) | 
|  |  | 
|  | git_repository = use_repo_rule( | 
|  | "@bazel_tools//tools/build_defs/repo:git.bzl", | 
|  | "git_repository", | 
|  | ) | 
|  |  | 
|  | git_repository( | 
|  | name = "bazel_clang_tidy", | 
|  | commit = "db677011c7363509a288a9fb3bf0a50830bbf791", | 
|  | remote = "https://github.com/erenon/bazel_clang_tidy.git", | 
|  | ) | 
|  |  | 
|  | register_toolchains( | 
|  | # Toolchain for the Pico 2 | 
|  | "@pigweed//pw_toolchain:cc_toolchain_cortex-m0", | 
|  | # Toolchain for the STM32 Discovery Board | 
|  | "@pigweed//pw_toolchain/arm_gcc:arm_gcc_cc_toolchain_cortex-m4", | 
|  | # Host toolchains | 
|  | "@pigweed//pw_toolchain/host_clang:host_cc_toolchain_linux", | 
|  | "@pigweed//pw_toolchain/host_clang:host_cc_toolchain_macos", | 
|  | dev_dependency = True, | 
|  | ) |