From 01283e9f23de965f55919d4008a7d9e20cf62109 Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Fri, 17 Jan 2025 19:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=93=E9=97=A8=E7=9A=84ma?= =?UTF-8?q?ke=E5=91=BD=E4=BB=A4=E7=94=9F=E6=88=90=20src=5Ffiles.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build_flash_kl3.sh | 1 + build/makefile.cfg | 15 +++++++++++++-- clear_output.py | 5 +++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/build/build_flash_kl3.sh b/build/build_flash_kl3.sh index 5ecbc0a..3d4bb4a 100755 --- a/build/build_flash_kl3.sh +++ b/build/build_flash_kl3.sh @@ -953,6 +953,7 @@ build_obj_func() { # ./make.py -j APP=${APP_SELECTION} -C .. clobber # fi # ./make.py -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + ./make.py -j APP=${APP_SELECTION} -C .. creat_src_file build_use_ninja ${DEF_PLATFORM_TYPE} ${APP_SELECTION} ${FLASH_SIZE_nM} if [ "${APP_SELECTION}" == "${DEF_CUS_APP}" ]; then #kl3 customer demo, cus_core. diff --git a/build/makefile.cfg b/build/makefile.cfg index a3c466f..8318dc7 100644 --- a/build/makefile.cfg +++ b/build/makefile.cfg @@ -84,8 +84,8 @@ SRCS += $(EXT_SRC) # all the obj names OBJECTS = $(addprefix $(BIN_DIR)/, $(patsubst %.S, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(SRCS))))) -$(shell echo $(SRCS) > "src_files.txt") -$(shell echo $(ADD_INCLUDE) >> "src_files.txt") +# $(shell echo $(SRCS) > "src_files.txt") +# $(shell echo $(ADD_INCLUDE) >> "src_files.txt") endif PLATFORM ?= FPGA @@ -422,6 +422,17 @@ clean: clobber: @echo clobber +creat_src_file:src_files.txt + +src_files.txt: + @echo $(SRCS) > "src_files.txt" + @echo $(ADD_INCLUDE) >> "src_files.txt" + @for d in $(SUB_DIRS) ; do\ + if [ -e "$$d/Makefile" ]; then\ + $(MAKE) -C $$d $@ ;\ + fi;\ + done + # clean obj files only clean_objs: -$(RM) $(OBJECTS) diff --git a/clear_output.py b/clear_output.py index 27d6e75..c0913c3 100644 --- a/clear_output.py +++ b/clear_output.py @@ -15,6 +15,10 @@ def clear(dir_path:str,rm_dir:str): shutil.rmtree(path) else: clear(path,rm_dir) + elif os.path.isfile(path): + if item == rm_dir: + print('remove: ',path) + os.remove(path) @@ -22,4 +26,5 @@ def clear(dir_path:str,rm_dir:str): if __name__ == "__main__": clear('../','.output') + clear('../','src_files.txt')