From 3ee9b3f1dde7eaa996dca81015d15e3f7bab6ac9 Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Sun, 1 Nov 2020 16:40:00 +0100 Subject: [PATCH] cleanup cmake project to move build instructions to toplevel --- CMakeLists.txt | 14 ++++++++++++++ Readme.md | 4 +++- {firmware => cmake}/avr-toolchain.cmake | 0 firmware/CMakeLists.txt | 11 ++--------- protocol/CMakeLists.txt | 13 +++++++++++++ 5 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 CMakeLists.txt rename {firmware => cmake}/avr-toolchain.cmake (100%) create mode 100644 protocol/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ab542b9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0.0) + +# configure target cpu +set(AVR_MCU attiny84) +include(cmake/avr-toolchain.cmake) + +# create project +project(slider-firmware C) + +# add protocol definition +add_subdirectory(protocol) + +# add the firmware target +add_subdirectory(firmware) \ No newline at end of file diff --git a/Readme.md b/Readme.md index 6b4a60d..03a4ab1 100644 --- a/Readme.md +++ b/Readme.md @@ -1 +1,3 @@ -All about the User Interface resides here +This repostitory is complementary to a project log entry on breadboarder.de about a mixing pult. + +The Schematic for the Board design presented here can be found in `doc/schematic.pdf`. diff --git a/firmware/avr-toolchain.cmake b/cmake/avr-toolchain.cmake similarity index 100% rename from firmware/avr-toolchain.cmake rename to cmake/avr-toolchain.cmake diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index 050e91c..ec88efa 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -1,11 +1,4 @@ cmake_minimum_required(VERSION 3.0.0) -set(AVR_MCU attiny84) -include(${CMAKE_CURRENT_SOURCE_DIR}/../avr-toolchain.cmake) - -project(slider_firmware C) - -add_subdirectory(SliderCommunication) - -add_avr_executable(slider_firmware led.c main.c adc.c button.c comm.c) -target_link_libraries(slider_firmware DSPLAB_SliderCommunication) +add_avr_executable(slider-firmware led.c main.c adc.c button.c comm.c) +target_link_libraries(slider-firmware slider-protocol) diff --git a/protocol/CMakeLists.txt b/protocol/CMakeLists.txt new file mode 100644 index 0000000..eb9f9d4 --- /dev/null +++ b/protocol/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.0.0) + +project(slider-protocol C) + +add_library(slider-protocol INTERFACE) + +# add_sources(slider-protocol +# PUBLIC +# communication.h +# interface.h +# ) + +target_include_directories(slider-protocol INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file