From 037d84bed61fb93a5292d0194bbf734fd2927378 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 13 May 2017 10:48:31 +0200 Subject: wip --- CMakeLists.txt | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2826974..002e4c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,17 @@ project(radio-controller C CXX ASM) set(CMAKE_CXX_STANDARD 14) +include(config.cmake) + +add_custom_target(kconfig DEPENDS config.cmake) + +add_custom_command(OUTPUT .config config.cmake + COMMAND /home/trygvis/opt/kconfig/bin/kconfig-mconf Kconfig + COMMAND cat .config | thirdparty/mcucpp/config-to-cmake > config.cmake + COMMAND echo Generated config.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + USES_TERMINAL) + add_executable(firmware src/radio-controller.cpp include/radio-controller.h) target_compile_definitions(firmware PUBLIC MCUCMAKE_USING_STM32CUBEMX=1) target_include_directories(firmware PUBLIC include) @@ -34,11 +45,25 @@ target_include_directories(firmware PUBLIC thirdparty/mcucpp/thirdparty/tinyprintf ) target_sources(firmware PUBLIC + thirdparty/mcucpp/include/mcu/arm/semihosting.h thirdparty/mcucpp/src/arm/semihosting.cpp - thirdparty/mcucpp/src/arm/semihosting-puts.cpp + thirdparty/mcucpp/src/arm/semihosting-puts.cpp thirdparty/mcucpp/src/arm/semihosting-putchar.cpp + thirdparty/mcucpp/src/generic/tinyprintf-printf.cpp thirdparty/mcucpp/src/generic/tinyprintf-snprintf.cpp + + thirdparty/mcucpp/include/mcu/nonew/function.h + thirdparty/mcucpp/include/mcu/nonew/queue.h + + thirdparty/mcucpp/include/mcu/io/output_stream.h + thirdparty/mcucpp/src/io/output_stream.cpp + + thirdparty/mcucpp/include/mcu/stm32cubemx/debug.h + + thirdparty/mcucpp/include/mcu/stm32cubemx/uart.h + thirdparty/mcucpp/src/stm32cubemx/uart.cpp + thirdparty/mcucpp/thirdparty/tinyprintf/tinyprintf.c ) -- cgit v1.2.3