diff --git a/Components/CPP_Code_Folder/CMakeLists.txt b/Components/CPP_Code_Folder/CMakeLists.txt deleted file mode 100644 index 75c5457..0000000 --- a/Components/CPP_Code_Folder/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -# Put directory name to COMPONENT_NAME variable -get_filename_component(COMPONENT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) -# Set component name -project(${COMPONENT_NAME}) - -# Add source files -set(SOURCE_LIB - Src/file2.cpp -) - -# Add includes -include_directories( - Inc -) - -# Creating static library -add_library(${COMPONENT_NAME} STATIC ${SOURCE_LIB}) - -# Set dependence -Depends_On( - "C_Code_Folder" - "IncludeOnlyComponent" - ) \ No newline at end of file diff --git a/Components/CPP_Code_Folder/Inc/file2.hpp b/Components/CPP_Code_Folder/Inc/file2.hpp deleted file mode 100644 index 20f0b5c..0000000 --- a/Components/CPP_Code_Folder/Inc/file2.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include - -void Hello_From_CPP(void); \ No newline at end of file diff --git a/Components/CPP_Code_Folder/Src/file2.cpp b/Components/CPP_Code_Folder/Src/file2.cpp deleted file mode 100644 index 6553920..0000000 --- a/Components/CPP_Code_Folder/Src/file2.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "file2.hpp" -#include "file1.h" -#include "IncludeOnlyComponent.hpp" -#include "main.hpp" - - - -void Hello_From_CPP(void) -{ - ExtTest(); - Dependency_Demonstration(); - include_only_dependence_example(); - printf("Hello from CPP!\r\n"); -} \ No newline at end of file diff --git a/Components/C_Code_Folder/Inc/file1.h b/Components/C_Code_Folder/Inc/file1.h deleted file mode 100644 index 31418cc..0000000 --- a/Components/C_Code_Folder/Inc/file1.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __FILE1_HPP_ -#define __FILE1_HPP_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#include - -void Hello_From_C(void); -void Dependency_Demonstration(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/Components/C_Code_Folder/Src/file1.c b/Components/C_Code_Folder/Src/file1.c deleted file mode 100644 index 6d1bc81..0000000 --- a/Components/C_Code_Folder/Src/file1.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "file1.h" -#include "test.hpp" - -void Hello_From_C(void) -{ - printf("Hello from C!\r\n"); -} - -void Dependency_Demonstration(void) -{ - printf("Execute function from dependency library!\r\n"); -} - - diff --git a/Components/IncludeOnlyComponent/CMakeLists.txt b/Components/IncludeOnlyComponent/CMakeLists.txt deleted file mode 100644 index dabdbe9..0000000 --- a/Components/IncludeOnlyComponent/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.10) - -# Put directory name to COMPONENT_NAME variable -get_filename_component(COMPONENT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) -# Set component name -project(${COMPONENT_NAME}) - - -# Add includes -include_directories( - Inc -) \ No newline at end of file diff --git a/Components/IncludeOnlyComponent/Inc/IncludeOnlyComponent.hpp b/Components/IncludeOnlyComponent/Inc/IncludeOnlyComponent.hpp deleted file mode 100644 index cb56e83..0000000 --- a/Components/IncludeOnlyComponent/Inc/IncludeOnlyComponent.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -static inline void include_only_print(void) -{ - printf("Print from include only component\r\n"); -} - -static inline void include_only_dependence_example(void) -{ - printf("Print from include only dependence\r\n"); -} \ No newline at end of file diff --git a/Components/C_Code_Folder/CMakeLists.txt b/Components/NVS_Lib/CMakeLists.txt similarity index 90% rename from Components/C_Code_Folder/CMakeLists.txt rename to Components/NVS_Lib/CMakeLists.txt index 33e6abe..65ee557 100644 --- a/Components/C_Code_Folder/CMakeLists.txt +++ b/Components/NVS_Lib/CMakeLists.txt @@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.10) # Put directory name to COMPONENT_NAME variable get_filename_component(COMPONENT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) - # Set component name project(${COMPONENT_NAME}) # Add source files set(SOURCE_LIB - Src/file1.c + Src/NVS.cpp ) # Add includes @@ -18,7 +17,3 @@ include_directories( # Creating static library add_library(${COMPONENT_NAME} STATIC ${SOURCE_LIB}) - - -Depends_On_Main() - diff --git a/Components/NVS_Lib/Inc/NVS.hpp b/Components/NVS_Lib/Inc/NVS.hpp new file mode 100644 index 0000000..da2ad0d --- /dev/null +++ b/Components/NVS_Lib/Inc/NVS.hpp @@ -0,0 +1,5 @@ +#ifndef __NVS_HPP__ +#define __NVS_HPP__ + + +#endif /* __NVS_HPP__ */ diff --git a/Components/NVS_Lib/Src/NVS.cpp b/Components/NVS_Lib/Src/NVS.cpp new file mode 100644 index 0000000..4371e82 --- /dev/null +++ b/Components/NVS_Lib/Src/NVS.cpp @@ -0,0 +1 @@ +#include "NVS.hpp" \ No newline at end of file diff --git a/Core/Inc/main.hpp b/Core/Inc/main.hpp index e78f24f..58336ac 100644 --- a/Core/Inc/main.hpp +++ b/Core/Inc/main.hpp @@ -1,7 +1,4 @@ #pragma once -#include "file1.h" -#include "file2.hpp" -#include "test.hpp" diff --git a/Core/Inc/test.hpp b/Core/Inc/test.hpp deleted file mode 100644 index 16204a0..0000000 --- a/Core/Inc/test.hpp +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void ExtTest(void); \ No newline at end of file diff --git a/Core/Src/main.cpp b/Core/Src/main.cpp index 48382dc..6473451 100644 --- a/Core/Src/main.cpp +++ b/Core/Src/main.cpp @@ -1,19 +1,11 @@ #include "main.hpp" -#include "IncludeOnlyComponent.hpp" -void ExtTest(void) -{ - -} - // Основная программа int main(void) { - include_only_print(); - Hello_From_C(); - Hello_From_CPP(); + return 0; }