From 3bb692cfa709d2ec9165788ed3e4f5b88ebc6686 Mon Sep 17 00:00:00 2001 From: jzlv Date: Wed, 28 Jul 2021 15:05:46 +0800 Subject: [PATCH] [fix][shell] fix shell fs enable error in compile which causes no such file --- components/shell/CMakeLists.txt | 86 ++++++++++++++++----------------- components/shell/shell_fs.c | 2 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/components/shell/CMakeLists.txt b/components/shell/CMakeLists.txt index 242b2695..0d867599 100644 --- a/components/shell/CMakeLists.txt +++ b/components/shell/CMakeLists.txt @@ -1,43 +1,43 @@ -################# Add global include ################# -list(APPEND ADD_INCLUDE -"${CMAKE_CURRENT_SOURCE_DIR}" -) -####################################################### - -################# Add private include ################# -# list(APPEND ADD_PRIVATE_INCLUDE - -# ) -####################################################### - -############## Add current dir source files ########### -file(GLOB_RECURSE sources -"${CMAKE_CURRENT_SOURCE_DIR}/*.c") -#aux_source_directory(. sources) -list(APPEND ADD_SRCS ${sources}) -####################################################### - -########### Add required/dependent components ######### -#list(APPEND ADD_REQUIREMENTS xxx) -####################################################### - -############ Add static libs ########################## -#list(APPEND ADD_STATIC_LIB "libxxx.a") -####################################################### - -############ Add dynamic libs ######################### -# list(APPEND ADD_DYNAMIC_LIB "libxxx.so" -# ) -####################################################### - -############ Add global compile option ################ -#add components denpend on this component -# list(APPEND ADD_DEFINITIONS -Dxxx) -####################################################### - -############ Add private compile option ################ -#add compile option for this component that won't affect other modules -# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx) -####################################################### - -generate_library() +################# Add global include ################# +list(APPEND ADD_INCLUDE +"${CMAKE_CURRENT_SOURCE_DIR}" +) +####################################################### + +################# Add private include ################# +# list(APPEND ADD_PRIVATE_INCLUDE + +# ) +####################################################### + +############## Add current dir source files ########### +file(GLOB_RECURSE sources +"${CMAKE_CURRENT_SOURCE_DIR}/*.c") +#aux_source_directory(. sources) +list(APPEND ADD_SRCS ${sources}) +####################################################### + +########### Add required/dependent components ######### +# list(APPEND ADD_REQUIREMENTS fatfs) +####################################################### + +############ Add static libs ########################## +#list(APPEND ADD_STATIC_LIB "libxxx.a") +####################################################### + +############ Add dynamic libs ######################### +# list(APPEND ADD_DYNAMIC_LIB "libxxx.so" +# ) +####################################################### + +############ Add global compile option ################ +#add components denpend on this component +list(APPEND ADD_DEFINITIONS -DSUPPORT_SHELL) +####################################################### + +############ Add private compile option ################ +#add compile option for this component that won't affect other modules +# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx) +####################################################### + +generate_library() diff --git a/components/shell/shell_fs.c b/components/shell/shell_fs.c index 96a22420..8bfefb71 100644 --- a/components/shell/shell_fs.c +++ b/components/shell/shell_fs.c @@ -1,8 +1,8 @@ +#if defined(SHELL_USING_FS) #include "shell.h" #include "ff.h" #include "fatfs_posix_api.h" -#if defined(SHELL_USING_FS) /* static void *(*shell_malloc)(size_t size) = mmheap_alloc; static void (*shell_free)(void *ptr) = mmheap_free;