diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2017-01-13 16:22:34 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2017-01-13 16:22:34 +0100 |
commit | b485617e1578ade7cb02e65a674d56315098b18c (patch) | |
tree | 50b04824ff0c86ba111dd355f9d41b9039cfe4de /apps/can1/CMakeLists.txt | |
parent | a61766db0f2954ab2e995717c276e3a30749773a (diff) | |
download | stm32f103-playground-b485617e1578ade7cb02e65a674d56315098b18c.tar.gz stm32f103-playground-b485617e1578ade7cb02e65a674d56315098b18c.tar.bz2 stm32f103-playground-b485617e1578ade7cb02e65a674d56315098b18c.tar.xz stm32f103-playground-b485617e1578ade7cb02e65a674d56315098b18c.zip |
o Adding a CAN example.
Diffstat (limited to 'apps/can1/CMakeLists.txt')
-rw-r--r-- | apps/can1/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/can1/CMakeLists.txt b/apps/can1/CMakeLists.txt new file mode 100644 index 0000000..20ebd0d --- /dev/null +++ b/apps/can1/CMakeLists.txt @@ -0,0 +1,25 @@ +add_executable(can1.elf can1.cpp + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) +target_link_libraries(can1.elf tinyprintf) + +target_include_directories(can1.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) + +target_compile_definitions(can1.elf PUBLIC + ${STM32F10X_STDPERIPH_DEFINES}) + +set_target_properties(can1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(can1.elf) |