~aleteoryx/muditaos

ref: sign_test muditaos/board/rt1051/CMakeLists.txt -rw-r--r-- 1.4 KiB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
add_library(board STATIC)

add_subdirectory(cmsis)
add_subdirectory(${BOARD})

if (${MEMORY_LINKER_FILE_PATH} STREQUAL "")
    message(FATAL_ERROR "Linker RAM layout not provided")
endif()

set (CMAKE_EXE_LINKER_FLAGS "-nostdlib -Xlinker --gc-sections -Xlinker --sort-section=alignment -mcpu=cortex-m7 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Xlinker -print-memory-usage -T ${LDSCRIPTSDIR}/libs.ld -T ${MEMORY_LINKER_FILE_PATH} -T ${LDSCRIPTSDIR}/sections.ld -nostartfiles" CACHE INTERNAL "")

if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 12))
    set(GCC_CXX_DIR_ITERATOR "newlib/gcc11/fs_dir.cc")
else()
    set(GCC_CXX_DIR_ITERATOR "newlib/gcc12/fs_dir.cc")
endif()


target_sources(board
    PRIVATE
        memcpy-armv7m.S
        crashdump/consoledump.cpp
        crashdump/crashcatcher_impl.cpp
        crashdump/crashdumpwriter_vfs.cpp
        memwrap.c
        newlib/io_syscalls.cpp
        newlib/cxx_guards.cpp
        xip/evkbimxrt1050_flexspi_nor_config.c
        xip/evkbimxrt1050_sdram_ini_dcd.c
        xip/fsl_flexspi_nor_boot.c
        ${GCC_CXX_DIR_ITERATOR}
)


target_include_directories(board
    PUBLIC
        $<BUILD_INTERFACE:
            ${CMAKE_CURRENT_SOURCE_DIR}
        >
)

target_link_libraries(board
    PRIVATE
        utils-rotator
        crashdump-metadata-store
    PUBLIC
        fsl
        module-vfs
        log-api
        CrashCatcher::CrashCatcher
)