zephyr/arch/posix/core/CMakeLists.txt
Jonathan Rico 05cc2f37a3 arch: posix: break debugger on fatal error
Add option to raise a SIGTRAP on fatal error, making the debugger break
instead of exiting.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-08-04 14:15:19 +02:00

36 lines
716 B
CMake

# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_compile_definitions(NO_POSIX_CHEATS)
zephyr_library_sources(
cpuhalt.c
fatal.c
irq.c
swap.c
thread.c
)
if(CONFIG_ARCH_POSIX_TRAP_ON_FATAL)
if(CONFIG_NATIVE_LIBRARY)
target_sources(native_simulator INTERFACE fatal_trap.c)
else()
zephyr_library_sources(fatal_trap.c)
endif()
endif()
if(CONFIG_NATIVE_APPLICATION)
zephyr_include_directories(
nsi_compat/
)
zephyr_library_sources(
posix_core.c
nsi_compat/nsi_compat.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nce.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nsi_host_trampolines.c
)
else()
zephyr_library_sources(
posix_core_nsi.c
)
endif()