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 15load("@rules_cc//cc:cc_library.bzl", "cc_library") 16load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library") 17load("//pw_build:compatibility.bzl", "incompatible_with_mcu") 18 19package(default_visibility = ["//visibility:public"]) 20 21licenses(["notice"]) 22 23cc_library( 24 name = "config_assert", 25 hdrs = [ 26 "public/pw_third_party/freertos/config_assert.h", 27 ], 28 defines = select({ 29 "@freertos//:disable_task_statics": [ 30 "PW_THIRD_PARTY_FREERTOS_NO_STATICS=1", 31 ], 32 "//conditions:default": [], 33 }), 34 strip_include_prefix = "public", 35 target_compatible_with = [ 36 "//pw_build/constraints/rtos:freertos", 37 ], 38 deps = [ 39 "//pw_assert:assert", 40 "//pw_assert:check", 41 ], 42) 43 44alias( 45 name = "freertos_config", 46 actual = select({ 47 "//targets/rp2040:freertos_config_cv": "//targets/rp2040:freertos_config", 48 "//targets/stm32f429i_disc1_stm32cube:freertos_config_cv": "//targets/stm32f429i_disc1_stm32cube:freertos_config", 49 "//conditions:default": "@freertos//:default_freertos_config", 50 }), 51) 52 53cc_library( 54 name = "support", 55 srcs = [ 56 "pw_assert_malloc_failed_hook.cc", 57 "pw_assert_stack_overflow_hook.cc", 58 "static_task_allocation.cc", 59 ], 60 implementation_deps = ["//pw_assert:check"], 61 target_compatible_with = [ 62 "//pw_build/constraints/rtos:freertos", 63 ], 64 deps = [ 65 "//pw_string:util", 66 "@freertos", 67 ], 68 alwayslink = True, 69) 70 71filegroup( 72 name = "doxygen", 73 srcs = [ 74 "pw_assert_stack_overflow_hook.cc", 75 "static_task_allocation.cc", 76 ], 77) 78 79sphinx_docs_library( 80 name = "docs", 81 srcs = [ 82 "docs.rst", 83 ], 84 target_compatible_with = incompatible_with_mcu(), 85) 86