blob: 1f762cc67b9887d086498886615e603165fba311 [file] [log] [blame]
cmake_minimum_required(VERSION 3.10)
project(vector_executive)
set(TARGET vector_executive)
set(ELF ${TARGET}.elf)
add_executable(${ELF} ${TARGET}.c)
set_target_properties(${ELF} PROPERTIES LINK_DEPENDS "${LINKER_SCRIPT}")
target_link_libraries(${ELF} springbok)
set_target_properties(
${ELF}
PROPERTIES
LINK_FLAGS
"-specs=nano.specs \
-Wl,--gc-sections \
-Wl,--print-memory-usage \
-Wl,-Map=${PROJECT_NAME}.map \
-T${LINKER_SCRIPT}")
target_compile_options(${ELF} PUBLIC
-Wall
-Werror
-O3
-g3
-ggdb
-ffreestanding
-ffunction-sections
-fstack-usage
-mstrict-align)