aboutsummaryrefslogtreecommitdiff
path: root/apps/os1/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2016-01-02 21:13:31 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2016-01-02 21:13:31 +0100
commitbaedda497d16c5096971eee83a0c467fe663fe6d (patch)
tree2f8925c68d94aed7d5fc7022462abbb359200b9e /apps/os1/CMakeLists.txt
parent9129af503c8211d713c8a160a3b6f3f86b328639 (diff)
downloadstm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.gz
stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.bz2
stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.xz
stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.zip
o Moving around a lot of files.
Diffstat (limited to 'apps/os1/CMakeLists.txt')
-rw-r--r--apps/os1/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/os1/CMakeLists.txt b/apps/os1/CMakeLists.txt
new file mode 100644
index 0000000..b6849b7
--- /dev/null
+++ b/apps/os1/CMakeLists.txt
@@ -0,0 +1,23 @@
+add_executable(os1.elf os1.cpp os1_cm3.s
+ ${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_usart.c
+ ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
+ )
+target_link_libraries(os1.elf tinyprintf)
+
+target_include_directories(os1.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(os1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES})
+
+set_target_properties(os1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld")
+add_extra_commands(os1.elf)