[fix][shell] fix shell fs enable error in compile which causes no such file

This commit is contained in:
jzlv 2021-07-28 15:05:46 +08:00
parent 789618b2d2
commit 3bb692cfa7
2 changed files with 44 additions and 44 deletions

View file

@ -1,43 +1,43 @@
################# Add global include ################# ################# Add global include #################
list(APPEND ADD_INCLUDE list(APPEND ADD_INCLUDE
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
) )
####################################################### #######################################################
################# Add private include ################# ################# Add private include #################
# list(APPEND ADD_PRIVATE_INCLUDE # list(APPEND ADD_PRIVATE_INCLUDE
# ) # )
####################################################### #######################################################
############## Add current dir source files ########### ############## Add current dir source files ###########
file(GLOB_RECURSE sources file(GLOB_RECURSE sources
"${CMAKE_CURRENT_SOURCE_DIR}/*.c") "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
#aux_source_directory(. sources) #aux_source_directory(. sources)
list(APPEND ADD_SRCS ${sources}) list(APPEND ADD_SRCS ${sources})
####################################################### #######################################################
########### Add required/dependent components ######### ########### Add required/dependent components #########
#list(APPEND ADD_REQUIREMENTS xxx) # list(APPEND ADD_REQUIREMENTS fatfs)
####################################################### #######################################################
############ Add static libs ########################## ############ Add static libs ##########################
#list(APPEND ADD_STATIC_LIB "libxxx.a") #list(APPEND ADD_STATIC_LIB "libxxx.a")
####################################################### #######################################################
############ Add dynamic libs ######################### ############ Add dynamic libs #########################
# list(APPEND ADD_DYNAMIC_LIB "libxxx.so" # list(APPEND ADD_DYNAMIC_LIB "libxxx.so"
# ) # )
####################################################### #######################################################
############ Add global compile option ################ ############ Add global compile option ################
#add components denpend on this component #add components denpend on this component
# list(APPEND ADD_DEFINITIONS -Dxxx) list(APPEND ADD_DEFINITIONS -DSUPPORT_SHELL)
####################################################### #######################################################
############ Add private compile option ################ ############ Add private compile option ################
#add compile option for this component that won't affect other modules #add compile option for this component that won't affect other modules
# list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx) # list(APPEND ADD_PRIVATE_DEFINITIONS -Dxxx)
####################################################### #######################################################
generate_library() generate_library()

View file

@ -1,8 +1,8 @@
#if defined(SHELL_USING_FS)
#include "shell.h" #include "shell.h"
#include "ff.h" #include "ff.h"
#include "fatfs_posix_api.h" #include "fatfs_posix_api.h"
#if defined(SHELL_USING_FS)
/* /*
static void *(*shell_malloc)(size_t size) = mmheap_alloc; static void *(*shell_malloc)(size_t size) = mmheap_alloc;
static void (*shell_free)(void *ptr) = mmheap_free; static void (*shell_free)(void *ptr) = mmheap_free;