blob: 579a4f7aad7086b019bedddf2347c95ae2e6bd59 [file] [log] [blame]
# Copyright 2024 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.
load("@pigweed//pw_build:merge_flags.bzl", "flags_from_dict")
load("//:cc.bzl", "zephyr_cc_library")
package(default_visibility = ["//visibility:public"])
constraint_value(
name = "tdk_robokit1",
constraint_setting = "//boards:board_name",
)
# TODO this should be in Pigweed once I can get Zephyr in Pigweed's MODULE.bazel
zephyr_cc_library(
name = "pw_sys_io_zephyr",
srcs = ["@pigweed//pw_sys_io_zephyr:sys_io.cc"],
deps = [
"@pigweed//pw_sys_io:default_putget_bytes",
"@pigweed//pw_sys_io:pw_sys_io.facade",
"//modules/cmsis",
"@zephyr_version//:version",
],
)
platform(
name = "robokit1",
constraint_values = [
"@pigweed//pw_build/constraints/arm:cortex-m7",
":tdk_robokit1",
"@platforms//cpu:armv7e-m",
"@platforms//os:none",
],
flags = flags_from_dict({
"@zephyr//:dts_cc_library": "@zephyr//boards/tdk/robokit1:devicetree_generated",
"@zephyr//:soc": "@zephyr//soc/atmel/sam:samx7x",
"@zephyr//:soc_linkerscript": "@zephyr//include/zephyr/arch/arm/cortex_m/scripts:linker",
"@zephyr//:offsets_lib": "@zephyr//arch/arm:offsets",
"@pigweed//pw_assert:backend": "@pigweed//pw_assert_basic",
"@pigweed//pw_assert:check_backend": "@pigweed//pw_assert_basic",
"@pigweed//pw_sys_io:backend": "@zephyr//boards/tdk:pw_sys_io_zephyr",
"@pigweed//pw_log:backend": "@pigweed//pw_log_basic",
"@pigweed//pw_log:backend_impl": "@pigweed//pw_build:empty_cc_library",
"@pigweed//pw_malloc:backend": "@pigweed//pw_malloc:bucket_block_allocator",
}),
)