summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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
)