xref: /aosp_15_r20/external/pigweed/third_party/freertos/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15package(default_visibility = ["//visibility:public"])
16
17licenses(["notice"])
18
19cc_library(
20    name = "config_assert",
21    hdrs = [
22        "public/pw_third_party/freertos/config_assert.h",
23    ],
24    defines = select({
25        "@freertos//:disable_task_statics": [
26            "PW_THIRD_PARTY_FREERTOS_NO_STATICS=1",
27        ],
28        "//conditions:default": [],
29    }),
30    strip_include_prefix = "public",
31    deps = [
32        "//pw_assert",
33    ],
34)
35
36alias(
37    name = "freertos_config",
38    actual = select({
39        "//targets/rp2040:freertos_config_cv": "//targets/rp2040:freertos_config",
40        "//targets/stm32f429i_disc1_stm32cube:freertos_config_cv": "//targets/stm32f429i_disc1_stm32cube:freertos_config",
41        "//conditions:default": "@freertos//:default_freertos_config",
42    }),
43)
44
45cc_library(
46    name = "support",
47    srcs = [
48        "pw_assert_malloc_failed_hook.cc",
49        "pw_assert_stack_overflow_hook.cc",
50        "static_task_allocation.cc",
51    ],
52    deps = [
53        "//pw_assert",
54        "//pw_string:util",
55        "@freertos",
56    ],
57    alwayslink = True,
58)
59