summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-05-13 10:48:31 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-05-16 23:24:34 +0200
commit037d84bed61fb93a5292d0194bbf734fd2927378 (patch)
tree1e3062ea7309adcc274cdbe61f3505b04bc68dfe /CMakeLists.txt
parentce168959907bc922875902a703a1aebe2296ad2c (diff)
downloadradio-controller-037d84bed61fb93a5292d0194bbf734fd2927378.tar.gz
radio-controller-037d84bed61fb93a5292d0194bbf734fd2927378.tar.bz2
radio-controller-037d84bed61fb93a5292d0194bbf734fd2927378.tar.xz
radio-controller-037d84bed61fb93a5292d0194bbf734fd2927378.zip
wip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 26 insertions, 1 deletions
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
)