From 46d93fba85e317c6faf9bbf4f278790b3a0e74ef Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Sat, 28 Sep 2024 16:01:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B9=8B=E5=89=8D=E5=85=88?= =?UTF-8?q?=E7=94=9F=E6=88=90=20bin=5Ftools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 14 +++++++++++++- build/build_flash_kl3.sh | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 09f4720..da164ee 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,16 @@ plc_core1.h bb_cpu.txt sec_cpu.txt # ReadMe.txt -build_commands.txt \ No newline at end of file +build_commands.txt +tools/bin_tool/bin2hex +tools/bin_tool/hex2bin +tools/bin_tool/bin2hex_frame +tools/gen_img/customer/ +tools/gen_img/ah +tools/gen_img/elzma +tools/gen_img/oem_tool +tools/gen_img/*.map +tools/gen_img/*.out +tools/gen_img/*.bin +tools/gen_img/*.bin.fw +tools/gen_img/lib_sdk_source/ \ No newline at end of file diff --git a/build/build_flash_kl3.sh b/build/build_flash_kl3.sh index d5403fb..48288c4 100755 --- a/build/build_flash_kl3.sh +++ b/build/build_flash_kl3.sh @@ -659,6 +659,27 @@ if [ ! -d "${GEN_IMG_FOLDER}/lib_sdk_source" ]; then mkdir ${GEN_IMG_FOLDER}/lib_sdk_source fi +# 如果不存在这些工具则创建 +if [ ! -e "../tools/bin_tool/bin2hex" ]; then + cd "../tools/bin_tool" + gcc bin2hex.c -o bin2hex + cd - +fi + +if [ ! -e "../tools/bin_tool/hex2bin" ]; then + cd "../tools/bin_tool" + gcc hex2bin.c -o hex2bin + cd - +fi + +if [ ! -e "../tools/bin_tool/bin2hex_frame" ]; then + cd "../tools/bin_tool" + gcc bin2hex_frame.c -o bin2hex_frame + cd - +fi + + + export HW_CHIP_ID="${DEF_CHIP_ID}" build_obj_func() { @@ -906,6 +927,7 @@ build_obj_func() { echo "start building: $0 $@ , $(date +%Y-%m-%d\ %H:%M:%S)" if [ "${DEF_CORE_TYPE}" == "ampplc" ]; then build_obj_func ${DEF_IMAGE_TYPE} ${DEF_CUS_APP} CUS + echo "build_flash_kl3.sh call make_ld.sh." ../tools/rom_img/make_ld.sh --addrs ../ap/.output/cus/lib/ht_${DEF_IMAGE_TYPE}.out \ ../startup/ldscripts/riscv3/amp_cus_symbol > ../startup/ldscripts/riscv3/cus.addrs.ld fi