skl-tunnel/CMakeLists.txt
2022-06-28 00:20:32 +03:00

103 lines
2.0 KiB
CMake

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(skl_tunnel
LANGUAGES
C CXX
)
include(FetchContent)
FetchContent_Declare(
skullc
GIT_REPOSITORY "https://git.skullnet.me/erki/skullc-peripherals.git"
)
set(SKULLC_WITH_HAL OFF)
set(SKULLC_WITH_TESTS OFF)
FetchContent_MakeAvailable(skullc)
add_executable(skl_tunnel
hal/src/hal_io.c
samd21a/gcc/gcc/startup_samd21.c
hpl/eic/hpl_eic.c
hal/utils/src/utils_syscalls.c
hal/src/hal_spi_m_sync.c
hal/src/hal_delay.c
hpl/pm/hpl_pm.c
hpl/core/hpl_init.c
hal/utils/src/utils_list.c
hpl/core/hpl_core_m0plus_base.c
hal/utils/src/utils_assert.c
hpl/dmac/hpl_dmac.c
hpl/sysctrl/hpl_sysctrl.c
hpl/sercom/hpl_sercom.c
hpl/gclk/hpl_gclk.c
hal/src/hal_init.c
samd21a/gcc/system_samd21.c
examples/driver_examples.c
driver_init.c
hal/src/hal_usart_async.c
hal/src/hal_ext_irq.c
hal/utils/src/utils_ringbuffer.c
hal/src/hal_gpio.c
hal/utils/src/utils_event.c
hal/src/hal_sleep.c
atmel_start.c
hal/src/hal_atomic.c
radio/src/radio_spi.c
radio/src/radio_gpio.c
radio/src/radio_hw_instance.cpp
main.cpp
)
target_include_directories(skl_tunnel
PRIVATE
${CMAKE_CURRENT_LIST_DIR}
config
examples
hal/include
hal/utils/include
hpl/core
hpl/dmac
hpl/eic
hpl/gclk
hpl/pm
hpl/port
hpl/sercom
hpl/sysctrl
hri
CMSIS/Core/Include
samd21a/include
radio/include
skullc_interface/include
)
target_link_libraries(skl_tunnel
PRIVATE
skullc::utility
)
set_target_properties(skl_tunnel
PROPERTIES
CXX_STANDARD 17
C_STANDARD 11
)
target_compile_definitions(skl_tunnel
PRIVATE
"__SAMD21E17A__"
F_CPU=48000000
)
target_link_options(skl_tunnel
PRIVATE
-Wl,--script=${CMAKE_CURRENT_LIST_DIR}/samd21a/gcc/gcc/samd21e17a_flash.ld
-Wl,--gc-sections
-Wl,--print-memory-usage
)