~aleteoryx/muditaos

ref: sign_test muditaos/third-party/CrashDebug/CrashCatcher/CMakeLists.txt -rw-r--r-- 838 bytes
a217eeb3 — Dawid Wojtas [BH-2024] Fix lack of alarm directory after updating software 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
add_library(CrashCatcher OBJECT)
add_library(CrashCatcher::CrashCatcher ALIAS CrashCatcher)

# These files were copied from 'third-party/CrashDebug/src/CrashCatcher' and modified.
#
# Reasons for modification:
# * CrashCatcher_armv7m.S: need to enter MCU user mode in order to create a file dump.
#
# * CrashCatcherPriv.h
#   CrashCatcher.c
#   CrashCatcher.h    : need to expose MCU registers' state for console dump.

target_sources(
        CrashCatcher
    PRIVATE
        CrashCatcherPriv.h
        CrashCatcher.c
        CrashCatcher_armv7m.S
    PUBLIC
        include/CrashCatcher/CrashCatcher.h
)

set_property(
	SOURCE CrashCatcher_armv7m.S
	APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp"
)

target_include_directories(
        CrashCatcher
    PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)