diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2017-01-25 22:02:09 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2017-01-25 22:02:09 +0100 |
commit | 7f89aea2016ebde61b02914abc7984df50537f29 (patch) | |
tree | f21117d11242e26aeb880058f07263431adf869d /apps/dma1 | |
parent | 8a3fedbcb8fc58dae8b43db3cae39688ec0332ef (diff) | |
download | stm32f103-playground-7f89aea2016ebde61b02914abc7984df50537f29.tar.gz stm32f103-playground-7f89aea2016ebde61b02914abc7984df50537f29.tar.bz2 stm32f103-playground-7f89aea2016ebde61b02914abc7984df50537f29.tar.xz stm32f103-playground-7f89aea2016ebde61b02914abc7984df50537f29.zip |
o Improving the mcu-stm32 cmake library a bit. Starting on a USB example.
Diffstat (limited to 'apps/dma1')
-rw-r--r-- | apps/dma1/CMakeLists.txt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/dma1/CMakeLists.txt b/apps/dma1/CMakeLists.txt index 689e437..19321d8 100644 --- a/apps/dma1/CMakeLists.txt +++ b/apps/dma1/CMakeLists.txt @@ -1,19 +1,20 @@ +mcu_stm32_add_library(TARGET dma1-mcu-stm32 + DEVICE STM32F10X_MD + PARTS SPI GPIO DMA + DEFINES_VAR DEFINES_FROM_MCU_STM32) + add_executable(dma1.elf dma1.cpp - ${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_spi.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c - $<TARGET_OBJECTS:playground> + ${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(dma1.elf PUBLIC $<TARGET_PROPERTY:playground,INTERFACE_INCLUDE_DIRECTORIES> ) -target_compile_definitions(dma1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) +target_compile_definitions(dma1.elf PUBLIC ${DEFINES_FROM_MCU_STM32}) target_link_libraries(dma1.elf tinyprintf) +target_link_libraries(dma1.elf dma1-mcu-stm32) set_target_properties(dma1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") add_extra_commands(dma1.elf) |