From b4b54463ef3e5b566d17ee8b71200948c8039bde Mon Sep 17 00:00:00 2001 From: L-diy Date: Mon, 6 Nov 2023 15:06:52 +0100 Subject: [PATCH] Remove the Core/inc folder from the CMake file list Removed the Core/inc folder from the CMake source file list, otherwise fs_data.c will be compiled and give an error during linking. --- project/CMakeLists.txt | 4 +++- project/CMakeLists_template.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project/CMakeLists.txt b/project/CMakeLists.txt index 8f9a1a1..06d823d 100644 --- a/project/CMakeLists.txt +++ b/project/CMakeLists.txt @@ -53,7 +53,9 @@ include_directories(LWIP/App LWIP/Target Core/Inc Middlewares/Third_Party/LwIP/s add_definitions(-DDEBUG -DUSE_HAL_DRIVER -DSTM32F746xx) -file(GLOB_RECURSE SOURCES "Core/*.*" "LWIP/*.*" "Middlewares/*.*" "Drivers/*.*") +#file(GLOB_RECURSE SOURCES "Core/*.*" "LWIP/*.*" "Middlewares/*.*" "Drivers/*.*") +file(GLOB_RECURSE SOURCES "Core/Src/*.*" "Core/Startup/*.*" "LWIP/*.*" "Middlewares/*.*" "Drivers/*.*") + set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/STM32F746NGHX_FLASH.ld) diff --git a/project/CMakeLists_template.txt b/project/CMakeLists_template.txt index 3b7fc44..f02e32b 100644 --- a/project/CMakeLists_template.txt +++ b/project/CMakeLists_template.txt @@ -52,7 +52,9 @@ include_directories(${includes}) add_definitions(${defines}) -file(GLOB_RECURSE SOURCES ${sources}) +#file(GLOB_RECURSE SOURCES ${sources}) +file(GLOB_RECURSE SOURCES "Core/Src/*.*" "Core/Startup/*.*" "LWIP/*.*" "Middlewares/*.*" "Drivers/*.*") + set(LINKER_SCRIPT $${CMAKE_SOURCE_DIR}/${linkerScript})