From: SnickerSun Date: Mon, 25 Mar 2024 11:11:50 +0000 (+0800) Subject: 更新NorFlash为16M X-Git-Tag: release_V1.2.70_20241020_135402~1264 X-Git-Url: http://git.snicker.com.cn/img/static/gitweb.css?a=commitdiff_plain;h=2b26baee25db4c922f17aa5c069c35698d55eaf1;p=mirrors%2FFD230.git 更新NorFlash为16M 添加 mkota.sh 脚本,指定source和target 路径即可生成ota 脚本 --- diff --git a/code/sdk/build/config/target_config/brandy/build_brandy_update.py b/code/sdk/build/config/target_config/brandy/build_brandy_update.py index cba105e4b..2c72c5c4f 100755 --- a/code/sdk/build/config/target_config/brandy/build_brandy_update.py +++ b/code/sdk/build/config/target_config/brandy/build_brandy_update.py @@ -86,12 +86,14 @@ def get_new_image(info): # image_list.append("=".join([info.nv_bin, "nv"])) # 资源文件 - result = res_pack(info.res_dir, info.res_index, info.res_data) - #result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir) - if not result: - sys.exit("[ERROR] resource file pack failed!!!") - image_list.append("=".join([info.res_index, "res_index"])) - image_list.append("=".join([info.res_data, "res_data"])) + + if os.path.exists(info.res_dir) : + result = res_pack(info.res_dir, info.res_index, info.res_data) + #result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir) + if not result: + sys.exit("[ERROR] resource file pack failed!!!") + image_list.append("=".join([info.res_index, "res_index"])) + image_list.append("=".join([info.res_data, "res_data"])) # 镜像签名 # image_list.append("=".join([info.ssb_sign, "ssb_sign"])) diff --git a/code/sdk/build/config/target_config/brandy/param_sector/param_sector.json b/code/sdk/build/config/target_config/brandy/param_sector/param_sector.json index 9b7b12056..3e604696e 100755 --- a/code/sdk/build/config/target_config/brandy/param_sector/param_sector.json +++ b/code/sdk/build/config/target_config/brandy/param_sector/param_sector.json @@ -49,9 +49,9 @@ ["0x21", "0x00090000", "0x00070000"], ["0x22", "0x00100000", "0x00070000"], ["0x23", "0x00170000", "0x00140000"], - ["0x24", "0x002B0000", "0x00549000"], - ["0x30", "0x007F9000", "0x00004000"], - ["0x31", "0x007FD000", "0x00003000"] + ["0x24", "0x002B0000", "0x00D49000"], + ["0x30", "0x00FF9000", "0x00004000"], + ["0x31", "0x00FFD000", "0x00003000"] ] }, "Output_file_prefix":"AIoT" diff --git a/code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config_common.h b/code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config_common.h index 4e246f590..3edc736bf 100755 --- a/code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config_common.h +++ b/code/sdk/drivers/boards/brandy_evb/memory_config/include/memory_config_common.h @@ -157,7 +157,7 @@ */ #define FLASH_START 0x70000000 -#define FLASH_LENGTH 0x800000 +#define FLASH_LENGTH 0x1000000 #define FLASH_MAX_END (FLASH_START + FLASH_LENGTH) #define FLASH_PAGE_SIZE 4096 diff --git a/code/sdk/drivers/boards/brandy_evb/product/product_evb4_standard.h b/code/sdk/drivers/boards/brandy_evb/product/product_evb4_standard.h index 04cee1756..39fe7824e 100755 --- a/code/sdk/drivers/boards/brandy_evb/product/product_evb4_standard.h +++ b/code/sdk/drivers/boards/brandy_evb/product/product_evb4_standard.h @@ -31,10 +31,10 @@ #define BT_IMAGE_PAGES 112 #define HIFI0_IMAGE_PAGES 112 #define HIFI0_CODEC_PAGES 320 -#define APP_IMAGE_PAGES 1353 +#define APP_IMAGE_PAGES 3401 #define NV_IMAGE_PAGES 4 #define FOTA_IMAGE_PAGES 3 -#define FOTA_IMAGE_START 0x770000 +#define FOTA_IMAGE_START 0xFFD000 #define SSB_FOTA_OFFSET 0x0 #define XO_CTRIM_VALUR_DEFAULT 0x56 #define DSP1_IPC_ENABLE NO diff --git a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c index afab4caab..7720e9f18 100644 --- a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c +++ b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c @@ -159,7 +159,8 @@ errcode_t uapi_cywee_service_init(void) g_cywee_service_timer = osTimerNew((osTimerFunc_t)cywee_service_check_timer_callback, osTimerPeriodic, NULL, NULL); - + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_START_CHECK); + return ERRCODE_SUCC; } diff --git a/code/sdk/middleware/chips/brandy/nv/include/nv_config.h b/code/sdk/middleware/chips/brandy/nv/include/nv_config.h index facd7a5f1..6a01d6450 100755 --- a/code/sdk/middleware/chips/brandy/nv/include/nv_config.h +++ b/code/sdk/middleware/chips/brandy/nv/include/nv_config.h @@ -17,7 +17,7 @@ #define KV_PAGE_SIZE FLASH_PAGE_SIZE /* NV运行区默认起始地址(物理地址) */ -#define KV_STORE_START_ADDR (FLASH_PHYSICAL_ADDR_START + 0x7F9000) +#define KV_STORE_START_ADDR (FLASH_PHYSICAL_ADDR_START + 0xFF9000) /* NV运行区page数 */ #define KV_STORE_DATA_PAGE_NUM 4 /* NV运行区默认长度(不包含备份区) */ diff --git a/code/sdk/middleware/chips/brandy/update/include/upg_config.h b/code/sdk/middleware/chips/brandy/update/include/upg_config.h index d732236f4..6824517ec 100755 --- a/code/sdk/middleware/chips/brandy/update/include/upg_config.h +++ b/code/sdk/middleware/chips/brandy/update/include/upg_config.h @@ -15,9 +15,9 @@ #endif #define NO 0 -#define UPG_CFG_DEBUG_ENABLED NO +#define UPG_CFG_DEBUG_ENABLED YES #ifndef UPG_CFG_DEBUG_PRINT_ENABLED -#define UPG_CFG_DEBUG_PRINT_ENABLED NO +#define UPG_CFG_DEBUG_PRINT_ENABLED YES #endif #define UPG_CFG_DIRECT_FLASH_ACCESS NO #define UPG_CFG_PROCESS_NOTIFY_SUPPORT YES diff --git a/code/sdk/tools/pkg/chip_packet/brandy/packet.py b/code/sdk/tools/pkg/chip_packet/brandy/packet.py index 9a74cf5cb..d1696e5f3 100755 --- a/code/sdk/tools/pkg/chip_packet/brandy/packet.py +++ b/code/sdk/tools/pkg/chip_packet/brandy/packet.py @@ -73,10 +73,14 @@ def make_all_in_one_packet(pack_style_str): partition = os.path.join(SDK_DIR, "output", "brandy", "partition_table.bin") partition_bx = partition + "|0x7004F000|0x1000|100" nv = os.path.join(SDK_DIR, "output", "brandy", "nv_bin", "brandy_all_nv.bin") - nv_bx = nv + "|0x707F9000|0x4000|100" - + # nv_bx = nv + "|0x707F9000|0x4000|100" + nv_bx = nv + "|0x70FF9000|0x4000|100" + app = os.path.join(application_dir, "application.bin") - app_bx = app + "|0x702B0000|0x549000|18" + # app_bx = app + "|0x702B0000|0x549000|18" #origin + # define APP_IMAGE_PAGES (1353+2560) + # 2560*4*1024= 0xA00000 + app_bx = app + "|0x702B0000|0xD49000|18" bt = os.path.join(bin_dir, "bt.bin") bt_bx = bt + "|0x70090000|0x70000|20" diff --git a/mkota.sh b/mkota.sh new file mode 100644 index 000000000..1fc11280a --- /dev/null +++ b/mkota.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +if [ "$#" == "2" ] ; then +SOURCE_DIR=$1 +SOURCE_VERSION=`basename $SOURCE_DIR` +TARGET_DIR=$2 +TARGET_VERSION=`basename $TARGET_DIR` +if [ ! -d "$SOURCE_DIR" ] ; then +echo "$SOURCE_DIR not exist , skip create ota package" +echo "" +exit 0 +fi +if [ ! -d "$TARGET_DIR" ] ; then +echo "$TARGET_DIR not exist , skip create ota package" +echo "" +exit 0 +fi + +mkdir code/sdk/output/brandy/TestOTA/ -p +rm -rf code/sdk/output/brandy/TestOTA/* + +cp -r $SOURCE_DIR code/sdk/output/brandy/TestOTA/oldsoftware +cp -r $TARGET_DIR code/sdk/output/brandy/TestOTA/newsoftware + +cd code/sdk/ +./build/config/target_config/brandy/build_brandy_update.py +cd - + +mkdir release/ota -p +cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg +echo create ota file release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg done +else + +echo "" +echo "usage: $0 source_release target_release " +echo "" + +fi +