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')