diff --git a/ap/src/main.c b/ap/src/main.c index a74c98d..39564f2 100644 --- a/ap/src/main.c +++ b/ap/src/main.c @@ -20,16 +20,6 @@ Information is free from patent or copyright infringement. -#pragma pack(1) - -typedef struct{ - uint8_t a; - uint32_t b; -}test_def; - -#pragma pack() -test_def g_test; - @@ -38,9 +28,6 @@ int main() { iot_build_info_t info; - g_test.a=1; - g_test.b=2; - printf("a=%d,b=%d\n",g_test.a,g_test.b); #if IOT_SMART_GRID_ENABLE diff --git a/bb_cpu/Makefile b/bb_cpu/Makefile index bf8c6fe..1b15d58 100644 --- a/bb_cpu/Makefile +++ b/bb_cpu/Makefile @@ -87,7 +87,14 @@ extra_work = echo handle bb_cpu..;\ ifeq ($(bbcpu_enable), 1) .PHONY: TARGET -TARGET: .output/plc/lib/bb_cpu.out USR_CMD +TARGET: .output/plc/lib/bb_cpu.out + @echo "const char plc_core1[] = {" > plc_core1.h + @chmod 777 $(TOPDIR)/tools/bin_tool/bin2hex_frame + @$(TOPDIR)/tools/bin_tool/bin2hex_frame $(OUTPUT_DIR)/$(OUTPUT_NAME).bin tmp.txt + @cat tmp.txt >> plc_core1.h + @echo "};" >> plc_core1.h + @mv plc_core1.h $(TOPDIR)/dtest/dtest3/mac_phy/double_cpu/kl3_core0 + @rm -rf tmp.txt endif ifdef TOPDIR @@ -98,15 +105,6 @@ TOPDIR = $(CURDIR) export TOPDIR endif -# usr_cmd -USR_CMD:: - @echo "const char plc_core1[] = {" > plc_core1.h - @chmod 777 $(TOPDIR)/tools/bin_tool/bin2hex_frame - @$(TOPDIR)/tools/bin_tool/bin2hex_frame $(OUTPUT_DIR)/$(OUTPUT_NAME).bin tmp.txt - @cat tmp.txt >> plc_core1.h - @echo "};" >> plc_core1.h - @mv plc_core1.h $(TOPDIR)/dtest/dtest3/mac_phy/double_cpu/kl3_core0 - @rm -rf tmp.txt dump: $(OBJDUMP) -D -S -l $(OUTPUT_FULL_NAME) > $(OUTPUT_FULL_NAME).dump diff --git a/build/Makefile b/build/Makefile index a2563ba..036ac50 100644 --- a/build/Makefile +++ b/build/Makefile @@ -408,50 +408,50 @@ endif .PHONY:dtest dtest: - @make -C $(TOPDIR)/dtest dtest_only=1 + @$(MAKE) -C $(TOPDIR)/dtest dtest_only=1 dtest_clean: ifneq ($(product_line), BT) - @make -C $(TOPDIR)/plc/halphy clean + @$(MAKE) -C $(TOPDIR)/plc/halphy clean endif - @make -C $(TOPDIR)/dtest clean + @$(MAKE) -C $(TOPDIR)/dtest clean .PHONY:bootram bootram: - @make -C $(TOPDIR)/mfgtool/bootram + @$(MAKE) -C $(TOPDIR)/mfgtool/bootram bootram_clean: - @make -C $(TOPDIR)/mfgtool/bootram clean + @$(MAKE) -C $(TOPDIR)/mfgtool/bootram clean .PHONY:ram RAMDIR = $(TOPDIR)/mfgtool/ram ram: - @make -C $(RAMDIR) + @$(MAKE) -C $(RAMDIR) ram_clean: - @make -C $(RAMDIR) clean + @$(MAKE) -C $(RAMDIR) clean .PHONY:sbl sbl: - @make -C $(TOPDIR)/sbl + @$(MAKE) -C $(TOPDIR)/sbl sbl_clean: - @make -C $(TOPDIR)/sbl clean + @$(MAKE) -C $(TOPDIR)/sbl clean .PHONY:ah ah: - @make -C $(TOPDIR)/mfgtool/ah + @$(MAKE) -C $(TOPDIR)/mfgtool/ah ah_clean: - @make -C $(TOPDIR)/mfgtool/ah clean + @$(MAKE) -C $(TOPDIR)/mfgtool/ah clean .PHONY:lzma lzma: - @make -C $(TOPDIR)/mfgtool/lzma + @$(MAKE) -C $(TOPDIR)/mfgtool/lzma lzma_clean: - @make -C $(TOPDIR)/mfgtool/lzma clean + @$(MAKE) -C $(TOPDIR)/mfgtool/lzma clean .PHONY:oem_tool oem_tool: - @make -C $(TOPDIR)/mfgtool/oem_tool + @$(MAKE) -C $(TOPDIR)/mfgtool/oem_tool oem_tool_clean: - @make -C $(TOPDIR)/mfgtool/oem_tool clean + @$(MAKE) -C $(TOPDIR)/mfgtool/oem_tool clean # display the obj files and output name debug: diff --git a/build/build_flash_kl3.sh b/build/build_flash_kl3.sh index bdda43f..cb7ce98 100755 --- a/build/build_flash_kl3.sh +++ b/build/build_flash_kl3.sh @@ -737,10 +737,10 @@ build_obj_func() { export smart_cco_sta=1 . ${SRC_ENV_FILE} ${IMG_TYPE} ${APP_SELECTION} ${DEF_REL} ${DEF_FLASH} ${DEF_PSRAM} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi if [ "${APP_SELECTION}" == "${DEF_CUS_APP}" ]; then - make PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} PLC_SUPPORT_3_PHASE=0 -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} PLC_SUPPORT_3_PHASE=0 -C .. #kl3 cus_core file. cp ../ap/.output/cus/lib/ht_cco.bin ../tools/gen_img/ht_cus.bin cp ../ap/.output/cus/lib/ht_cco.out ../tools/gen_img/ht_cus.out @@ -750,14 +750,14 @@ build_obj_func() { else #kl3 plc_core file. if [ "${DEF_FLASH}" == "4m" ] && [ "${DEF_PSRAM}" == "8m" ]; then - make PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. cp ../ap/.output/plc/lib/ht_cco.bin ../tools/gen_img/iot_ht_3p.bin cp ../ap/.output/plc/lib/ht_cco.out ../tools/gen_img/ht_3p.out cp ../ap/.output/plc/lib/ht_cco.map ../tools/gen_img/ht_3p.map cp ../export/lib/libht_cco.a ${taget_cco_source_dir}/libht_plc_${plc_lib_kw}_3p.a - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} PLC_SUPPORT_3_PHASE=0 -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} PLC_SUPPORT_3_PHASE=0 -C .. cp ../ap/.output/plc/lib/ht_cco.bin ../tools/gen_img/iot_ht_1p.bin cp ../ap/.output/plc/lib/ht_cco.out ../tools/gen_img/ht_1p.out cp ../ap/.output/plc/lib/ht_cco.map ../tools/gen_img/ht_1p.map @@ -784,9 +784,9 @@ build_obj_func() { export cco=1 . ${SRC_ENV_FILE} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=1 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. if [ "${APP_SELECTION}" == "${DEF_CUS_APP}" ]; then #kl3 customer demo, cus_core. cp ../ap/.output/cus/lib/ht_cco.bin ../tools/gen_img/ht_cus.bin @@ -833,17 +833,17 @@ build_obj_func() { export smart_cco_sta=2 . ${SRC_ENV_FILE} ${IMG_TYPE} ${APP_SELECTION} ${DEF_REL} ${DEF_FLASH} ${DEF_PSRAM} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. . clean_env_flash_smart.sh ${IMG_TYPE} ${APP_SELECTION} else export cco=0 . ${SRC_ENV_FILE} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. fi if [ "${APP_SELECTION}" == "${DEF_CUS_APP}" ]; then @@ -883,10 +883,10 @@ build_obj_func() { . ${SRC_ENV_FILE} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. cp ../ap/.output/plc/lib/ht_ftm.bin ../tools/gen_img/ht.bin cp ../ap/.output/plc/lib/ht_ftm.out ../tools/gen_img/ht.out @@ -899,10 +899,10 @@ build_obj_func() { . ${SRC_ENV_FILE} if [ "${DEF_CLEANUP}" == "true" ]; then - make APP=${APP_SELECTION} -C .. clobber + make -j APP=${APP_SELECTION} -C .. clobber fi - make PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. + make -j PLATFORM=${DEF_PLATFORM_TYPE} cco=0 APP=${APP_SELECTION} FLASH_SIZE=${FLASH_SIZE_nM} -C .. cp ../ap/.output/plc/lib/ht_sta.bin ../tools/gen_img/ht.bin cp ../ap/.output/plc/lib/ht_sta.out ../tools/gen_img/ht.out diff --git a/build/makefile.cfg b/build/makefile.cfg index 7da1ecf..f20be6f 100644 --- a/build/makefile.cfg +++ b/build/makefile.cfg @@ -283,7 +283,7 @@ SIZE = riscv64-unknown-elf-size OBJCOPY = riscv64-unknown-elf-objcopy STRIP = riscv64-unknown-elf-strip MAKEDEP = -MM -FLAGS = -march=$(ISA) -mabi=$(ABI) -ffunction-sections -fdata-sections -ffast-math -fno-common -fno-builtin-printf -Wall $(GDB_FLAG) $(OPT_FLAG)\ +FLAGS = -march=$(ISA) -mabi=$(ABI) -ffunction-sections -fdata-sections -ffast-math -fno-common -Wno-array-bounds -fno-builtin-printf -Wall $(GDB_FLAG) $(OPT_FLAG)\ $(addprefix -D, $(PRE_MARCO))\ $(addprefix -D, $(GLOBAL_MACRO))\ $(addprefix -I, $(ADD_INCLUDE)) @@ -306,7 +306,7 @@ $(OUTPUT_FULL_NAME): $(OUTPUT_DIR) $(BIN_DIR)/.sub_dirs $(BIN_DIR)/.ext_src $(OB @python3 $(TOPDIR)/praper_vscode.py $(TOPDIR)/make_flags.txt $@ >> $(TOPDIR)/python_script_log.log @for d in $(SUB_DIRS); do\ if [ -e "$$d/Makefile" ]; then\ - make -C $$d || exit 1;\ + $(MAKE) -C $$d || exit 1;\ if [ 2 -eq $(OUTPUT_TYPE) ];then\ if [ -e $(OUTPUT_FULL_NAME) ]; then \ echo "open $(OUTPUT_FULL_NAME)">tmp.mri;\ @@ -373,7 +373,7 @@ $(BIN_DIR)/%.d: %.c @set -e; rm -f $@; \ $(CC) $(FLAGS) $(MAKEDEP) $< > $@.$$$$; \ sed 's,\($(notdir $*)\.o\)[: ]*,$(BIN_DIR)\/$*\.o : ,' < $@.$$$$ > $@; \ - echo -e -n "\t@echo 'build \x24@'\x0a" >> $@; \ + echo -e -n "\t@echo 'build \x24<'\x0a" >> $@; \ echo -e -n "\t@\x24(CC) \x24(FLAGS) -c \x24< -o \x24@" >> $@; \ $(RM) $@.$$$$ @@ -383,7 +383,7 @@ $(BIN_DIR)/%.d: %.S @set -e; rm -f $@; \ $(CC) $(MAKEDEP) $(FLAGS) $< > $@.$$$$; \ sed 's,\($(notdir $*)\.o\)[ : ]*,$(BIN_DIR)\/$*\.o : ,' < $@.$$$$ > $@; \ - echo -e -n "\t@echo 'build \x24@'\x0a" >> $@; \ + echo -e -n "\t@echo 'build \x24<'\x0a" >> $@; \ echo -e -n "\t@\x24(CC) \x24(FLAGS) -c \x24< -o \x24@" >> $@; \ $(RM) $@.$$$$ @@ -396,7 +396,7 @@ clean: -$(RM) $(OUTPUT_FULL_NAME) $(OBJECTS) $(DEPS) $(BIN_DIR)/.sub_dirs $(BIN_DIR)/.ext_src @for d in $(SUB_DIRS) ; do\ if [ -e "$$d/Makefile" ]; then\ - make -C $$d $@ ;\ + $(MAKE) -C $$d $@ ;\ fi;\ done -$(RM) $(OUTDIR) @@ -404,7 +404,7 @@ clean: clobber: @for d in $(SUB_DIRS); do\ if [ -e "$$d/Makefile" ]; then\ - make -C $$d $@ ;\ + $(MAKE) -C $$d $@ ;\ fi;\ done @-$(RM) $(TOPDIR)/make_flags.txt @@ -417,7 +417,7 @@ clean_objs: -$(RM) $(OBJECTS) @for d in $(SUB_DIRS); do\ if [ -e "$$d/Makefile" ]; then\ - make -C $$d $@ ;\ + $(MAKE) -C $$d $@ ;\ fi;\ done diff --git a/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core1/Makefile b/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core1/Makefile index e020aea..d60b20f 100644 --- a/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core1/Makefile +++ b/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core1/Makefile @@ -51,10 +51,7 @@ include $(CURDIR)/build/makefile.cfg TOPDIR = $(CURDIR) export TOPDIR endif -TARGET:: $(OUTPUT_FULL_NAME) USR_CMD - -# usr_cmd -USR_CMD:: +TARGET:: $(OUTPUT_FULL_NAME) @echo "const char mailbox_core1[] = {" > mailbox_core1.h @./bin2hex_frame $(OUTPUT_FULL_NAME:.out=.bin) tmp.txt @cat tmp.txt >> mailbox_core1.h diff --git a/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core2/Makefile b/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core2/Makefile index fdf98ce..8ad2d9d 100644 --- a/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core2/Makefile +++ b/dtest/dtest3/kl3_mailbox_amp_test/kl3_mailbox_core2/Makefile @@ -52,10 +52,7 @@ TOPDIR = $(CURDIR) export TOPDIR endif -TARGET:: $(OUTPUT_FULL_NAME) USR_CMD - -# usr_cmd -USR_CMD:: +TARGET:: $(OUTPUT_FULL_NAME) @echo "const char mailbox_core2[] = {" > mailbox_core2.h @./bin2hex_frame $(OUTPUT_FULL_NAME:.out=.bin) tmp.txt @cat tmp.txt >> mailbox_core2.h diff --git a/dtest/dtest3/kl3_multi_core_plc_test/kl3_plc_core1/Makefile b/dtest/dtest3/kl3_multi_core_plc_test/kl3_plc_core1/Makefile index 11b5f98..c6fe955 100644 --- a/dtest/dtest3/kl3_multi_core_plc_test/kl3_plc_core1/Makefile +++ b/dtest/dtest3/kl3_multi_core_plc_test/kl3_plc_core1/Makefile @@ -52,9 +52,7 @@ TOPDIR = $(CURDIR) export TOPDIR endif -TARGET:: $(OUTPUT_FULL_NAME) USR_CMD -# usr_cmd -USR_CMD:: +TARGET:: $(OUTPUT_FULL_NAME) @echo "const char plc_core1[] = {" > plc_core1.h @./bin2hex_frame $(OUTPUT_FULL_NAME:.out=.bin) tmp.txt @cat tmp.txt >> plc_core1.h diff --git a/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core1/Makefile b/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core1/Makefile index 244b444..8b070ed 100644 --- a/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core1/Makefile +++ b/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core1/Makefile @@ -51,10 +51,7 @@ include $(CURDIR)/build/makefile.cfg TOPDIR = $(CURDIR) export TOPDIR endif -TARGET:: $(OUTPUT_FULL_NAME) USR_CMD - -# usr_cmd -USR_CMD:: +TARGET:: $(OUTPUT_FULL_NAME) @echo "const char wdg_core1[] = {" > wdg_core1.h @./bin2hex_frame $(OUTPUT_FULL_NAME:.out=.bin) tmp.txt @cat tmp.txt >> wdg_core1.h diff --git a/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core2/Makefile b/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core2/Makefile index 52f9efe..4e246b1 100644 --- a/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core2/Makefile +++ b/dtest/dtest3/kl3_wdg_test_amp/kl3_wdg_core2/Makefile @@ -52,10 +52,7 @@ TOPDIR = $(CURDIR) export TOPDIR endif -TARGET:: $(OUTPUT_FULL_NAME) USR_CMD - -# usr_cmd -USR_CMD:: +TARGET:: $(OUTPUT_FULL_NAME) @echo "const char wdg_core2[] = {" > wdg_core2.h @./bin2hex_frame $(OUTPUT_FULL_NAME:.out=.bin) tmp.txt @cat tmp.txt >> wdg_core2.h diff --git a/dtest/dtest3/mac_phy/double_cpu/kl3_core1/Makefile b/dtest/dtest3/mac_phy/double_cpu/kl3_core1/Makefile index 2aa5400..5290d85 100644 --- a/dtest/dtest3/mac_phy/double_cpu/kl3_core1/Makefile +++ b/dtest/dtest3/mac_phy/double_cpu/kl3_core1/Makefile @@ -50,7 +50,13 @@ ADD_LIB += os driver common rf_mac ##################################################### .PHONY: TARGET -TARGET: .output/plc/lib/kl3_core1.out USR_CMD +TARGET: .output/plc/lib/kl3_core1.out + @echo "const char plc_core1[] = {" > plc_core1.h + @./bin2hex_frame ../kl3_core1/.output/plc/lib/kl3_core1.bin tmp.txt + @cat tmp.txt >> plc_core1.h + @echo "};" >> plc_core1.h + @mv plc_core1.h ../kl3_core0 + @rm -rf tmp.txt ifdef TOPDIR include $(TOPDIR)/build/makefile.cfg @@ -60,14 +66,6 @@ TOPDIR = $(CURDIR) export TOPDIR endif -# usr_cmd -USR_CMD:: - @echo "const char plc_core1[] = {" > plc_core1.h - @./bin2hex_frame ../kl3_core1/.output/plc/lib/kl3_core1.bin tmp.txt - @cat tmp.txt >> plc_core1.h - @echo "};" >> plc_core1.h - @mv plc_core1.h ../kl3_core0 - @rm -rf tmp.txt dump: $(OBJDUMP) -D -S -l $(OUTPUT_FULL_NAME) > $(OUTPUT_FULL_NAME).dump diff --git a/praper_vscode.py b/praper_vscode.py index a188c28..3505e7a 100644 --- a/praper_vscode.py +++ b/praper_vscode.py @@ -3,8 +3,38 @@ import os import sys import time + + + + + +''' + +这个文件用于编译时输出编译符号,在makefile.cfg中调用 +自动更新vscode的c/c++配置 + +2024.9.28 + 根据脚本位置来确定位置文件路径 + 使用非冗余的路径 + 使用宏定义字符转义 + +''' + + + +def unescape(line:str): + table=[("\\\"","\""),("\\<","<"),("\\>",">"),("\\$","$"),("\\(","("),("\\)",")")] + for item in table: + line=line.replace(item[0],item[1]) + # 删除多余的 $ 符号 + line=line.replace('$','') + return line + + + def main(flag_file:str,target:str): make_flags=flag_file + top_path=os.path.split(sys.argv[0])[0] current_path=os.path.abspath('.') if(make_flags!='clear'): with open(make_flags,encoding='utf-8') as f: @@ -14,7 +44,7 @@ def main(flag_file:str,target:str): else: flags="" print(time.strftime("%Y-%m-%d %H:%M:%S"),"clear vscode setting.") - cfgs_file_path='/mnt/disk/work/kunlun/.vscode/c_cpp_properties.json' + cfgs_file_path=f'{top_path}/.vscode/c_cpp_properties.json' with open(cfgs_file_path,encoding='utf-8') as f: cfgs=f.read() @@ -24,11 +54,12 @@ def main(flag_file:str,target:str): def_list=[] for item in flags_list: if(item[:2]=='-D'): - def_list.append(item[2:]) + def_list.append(unescape(item[2:])) elif(item[:2]=='-I'): p=item[2:] if(p[0]!='/'): p=os.path.join(current_path,p) + p=os.path.normpath(p) if(os.path.exists(p)): inc_list.append(p) else: @@ -40,6 +71,7 @@ def main(flag_file:str,target:str): if(make_flags!='clear'): predef_info["name"]="myname" for item in inc_list: + # 只有路径列表中不存在时才添加 if(item not in predef_info["includePath"]): predef_info["includePath"].append(item) for item in def_list: