aboutsummaryrefslogtreecommitdiff
path: root/apps/usb1/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-01-25 22:22:30 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2017-01-25 22:22:30 +0100
commit41fdd2b1f35bcb4224fdb8fee2b959e09d1f5916 (patch)
tree057d339465e4f6501373b405ae022472e453c2b7 /apps/usb1/CMakeLists.txt
parent7f89aea2016ebde61b02914abc7984df50537f29 (diff)
downloadstm32f103-playground-41fdd2b1f35bcb4224fdb8fee2b959e09d1f5916.tar.gz
stm32f103-playground-41fdd2b1f35bcb4224fdb8fee2b959e09d1f5916.tar.bz2
stm32f103-playground-41fdd2b1f35bcb4224fdb8fee2b959e09d1f5916.tar.xz
stm32f103-playground-41fdd2b1f35bcb4224fdb8fee2b959e09d1f5916.zip
o Seemingly working Mutexes.
o Dropping the privileged/unprivileged split for now.
Diffstat (limited to 'apps/usb1/CMakeLists.txt')
-rw-r--r--apps/usb1/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/usb1/CMakeLists.txt b/apps/usb1/CMakeLists.txt
new file mode 100644
index 0000000..568aff7
--- /dev/null
+++ b/apps/usb1/CMakeLists.txt
@@ -0,0 +1,20 @@
+mcu_stm32_add_library(TARGET usb1-mcu-stm32
+ DEVICE STM32F10X_MD
+ PARTS RCC SPI GPIO DMA USART
+ DEFINES_VAR DEFINES_FROM_MCU_STM32)
+
+add_executable(usb1.elf usb1.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
+ )
+
+target_include_directories(usb1.elf PUBLIC
+ $<TARGET_PROPERTY:playground,INTERFACE_INCLUDE_DIRECTORIES>
+ )
+target_compile_definitions(usb1.elf PUBLIC ${DEFINES_FROM_MCU_STM32})
+target_link_libraries(usb1.elf tinyprintf)
+target_link_libraries(usb1.elf usb1-mcu-stm32)
+
+set_target_properties(usb1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld")
+add_extra_commands(usb1.elf)