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 ${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_compile_definitions(dma1.elf PUBLIC ${DEFINES_FROM_MCU_STM32}) target_link_libraries(dma1.elf tinyprintf gcc) 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)