blob: f2989617a37e8a12d98a1df0aeb9f77823d19ce2 [file]
# Copyright 2021 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.
menu "pw_assert"
config PIGWEED_ASSERT_PIGWEED_OVERRIDES
bool
select ASSERT_CUSTOM_HEADER
help
Map all the Zephyr assert macros to use Pigweed's PW_ASSERT* macros, so
that all asserts are consumed by the same assert backend, provided by the
user. The user must also provide the assert backend header indirection.
config PIGWEED_ASSERT_ZEPHYR
bool "Link pw_assert_zephyr library"
select PIGWEED_PREPROCESSOR
default y
help
See :ref:`module-pw_assert` for module details.
menuconfig PIGWEED_ASSERT_TOKENIZED
bool "Maps all Zephyr assert macros to use pw_assert_tokenized as the backend"
select PIGWEED_ASSERT_PIGWEED_OVERRIDES
select PIGWEED_PREPROCESSOR
select PIGWEED_TOKENIZER
help
Map all the Zephyr assert macros to use Pigweed's then use the
:ref:`module-pw_assert_tokenized` target as the assert backend in order to
automatically tokenize all the assert strings. This means that Pigweed
will also tokenize all of Zephyr's assert statements. Assert failures are
forwarded to the log system. The tokenizer handler should check for
``LOG_LEVEL_FATAL`` and properly divert to a crash handler. Make sure an
appropriate PIGWEED_LOG_TOKENIZED* configuration is set.
endmenu