编译之前先生成 bin_tools

This commit is contained in:
2024-09-28 16:01:14 +08:00
parent a96a6fb2ad
commit 46d93fba85
2 changed files with 35 additions and 1 deletions

View File

@@ -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