更新程序
authorp15692025051 <846603105@qq.com>
Thu, 26 Jun 2025 09:48:11 +0000 (17:48 +0800)
committerp15692025051 <846603105@qq.com>
Thu, 26 Jun 2025 09:48:11 +0000 (17:48 +0800)
2.code/aicos/app/AI_AMP_2_5/AI_AMP_2_5.c
2.code/aicos/app/AI_AMP_2_5/AI_AMP_2_5.h
2.code/aicos/app/AI_AMP_2_5/imsl_vad.h
2.code/aicos/app/AI_AMP_2_5/libimslnn.a
2.code/aicos/app/AI_AMP_2_5/libimslvad.a
2.code/make.py

index d302175..68013d3 100644 (file)
@@ -20,6 +20,7 @@
 #include "bk_key.h"
 #include "aic_srv_tele_sim.h"
 #include <gpio_inc.h>
+#include "aic_version.h"
 #if SUPPORT_OPUS 
 #include "opus/guixin/opus_interface.h"
 
@@ -34,7 +35,9 @@
 #include "app_msg.h"
 #include "aic_ogg.h"
 #include "efuse.h"
+#include "bk_make_time.h"
 // #include "opus/include/opus.h"
+char FXH01_Version[100];
 u8 current_card_id = 0;
 u8 VC_TTS_PLAY_EVENT = 0;
 typedef enum
@@ -453,9 +456,9 @@ int check_text(char *text,int ret_str_len)
         }else if(strstr(text,"版本号"))
         {
             if(vc_cfg.dev_type == DEV_ADS)
-                tmp_data_len = snprintf(tmp_data,sizeof(tmp_data),"当前版本号为:%s_%s。","ADS_",BK_VERSION);
+                tmp_data_len = snprintf(tmp_data,sizeof(tmp_data),"当前版本号为:%s_%s。","ADS_",FXH01_Version);
             else
-                tmp_data_len = snprintf(tmp_data,sizeof(tmp_data),"当前版本号为:%s。",BK_VERSION);
+                tmp_data_len = snprintf(tmp_data,sizeof(tmp_data),"当前版本号为:%s。",FXH01_Version);
             AI_AMP_MSG_put(tmp_data,tmp_data_len,VC_TTS_PLAY);
             ret = 0;
             goto RET;   
@@ -2631,8 +2634,11 @@ static void AI_AMP_2_5_task(void *thread_input)//做逻辑线程
    
     app_audio_set_master_volume(15*vc_cfg.VC_TTS_volume/100);
     play_audio_file_event("C:/R_POWER_1.mp3");
-
-
+    //aic_get_version(FXH01_Version,sizeof(FXH01_Version));
+    snprintf(FXH01_Version,sizeof(FXH01_Version),"FX01H_%s",bk_make_timer);
+    bk_printf("FXH01_Version:%s",FXH01_Version);
+    bk_printf("FXH01_Version:%s",FXH01_Version);
+    bk_printf("FXH01_Version:%s",FXH01_Version);
     while(count --)
     {
         pdp_activated = aic_is_default_pdp_activated();
index 72345aa..5ae70da 100644 (file)
@@ -51,7 +51,8 @@ typedef struct
     unsigned int end_flag;
 
 }AI_AMP_2_5_cfg;
-#define BK_VERSION "BK_FX01H_V202505300931"
+//#define FXH01_Version "BK_FX01H_V202505300931"
+extern char FXH01_Version[];
 extern AI_AMP_2_5_cfg vc_cfg;
 typedef enum AI_AMP_MSG
 {
index e9199c9..22647f1 100644 (file)
@@ -2,6 +2,8 @@
 #define _IMSL_VAD_DLL
 #include <stdint.h>
 
+typedef int (*imsl_nn_printf_func)(const char *format, ...);
+
 struct AuthInfo
 {
     char dmp_token[64];
@@ -27,7 +29,7 @@ struct VadConfig
 返回值 :
     0  初始化失败
     1  试用模式 (最长30分钟)
-    2  æ\8e\88æ\9d\83模å\9e\8b ï¼\88æ\8e\88æ\9d\83失败  æ\8e§å\88¶å\8f°ä¼\9aæ\89\93å\8d°,同时转为试用模式)
+    2  æ\8e\88æ\9d\83æ\88\90å\8a\9f ï¼\88å¦\82æ\9e\9cæ\8e\88æ\9d\83失败æ\8e§å\88¶å\8f°ä¼\9aæ\89\93å\8d°é\94\99误信æ\81¯,同时转为试用模式)
 */
 int init_vad(const struct VadConfig* conf);
 
@@ -58,6 +60,10 @@ void free_vad();
 /*example :
     #include "imsl_vad.h"
 
+    // 设置log函数
+    extern imsl_nn_printf_func imsl_nn_printf;
+    imsl_nn_printf = printf;
+
     // 启用VAD时初始化
     struct VadConfig conf;
     conf.sil_threshold = 63;
index e6e2afe..ae4ac3e 100644 (file)
Binary files a/2.code/aicos/app/AI_AMP_2_5/libimslnn.a and b/2.code/aicos/app/AI_AMP_2_5/libimslnn.a differ
index 6bbda9f..1a82937 100644 (file)
Binary files a/2.code/aicos/app/AI_AMP_2_5/libimslvad.a and b/2.code/aicos/app/AI_AMP_2_5/libimslvad.a differ
index 0e672a6..f5f9353 100644 (file)
@@ -6,6 +6,7 @@ import os, sys, time, re, shutil, platform
 import subprocess, fileinput
 from multiprocessing import cpu_count
 from colorama import init
+from datetime import datetime
 init(autoreset=True)
 
 # set global path and value
@@ -22,7 +23,9 @@ global md_board_name, nv_board_name, nvram_board_config
 global subsys_config, board_config
 global binary_path, board_path, common_path
 global maincmd, subcmd, thirdcmd
-
+# 获取当前日期时间
+now = datetime.now()
+build_start_time_str = now.strftime("%Y_%m_%d_%H_%M_%S")
 #
 # Get build command parameter
 #
@@ -682,7 +685,7 @@ def aicos_build(cmd):
     global common_path
     global script_path
     global board_path
-
+    global build_start_time_str
     if cmd == "mkpkg":
         set_subsys_config("ap")
     else:
@@ -762,7 +765,7 @@ def aicos_build(cmd):
             suffix = "release"
         else:
             suffix = "debug"
-
+        suffix +="_{}".format(build_start_time_str)
         pkg_cfg_dir = targets_path  + "/" + chip_name + "/" + project_name + "/pkg"
         for root, dirs, files in os.walk(pkg_cfg_dir):
             for pkg_cfg_name in files:
@@ -1060,8 +1063,13 @@ def kconfig_build(subsys, kcfg_cmd):
         except:
             print("Unexpected error:", sys.exc_info())
             exit(1)
-
+def add_make_time_file():
+    global build_start_time_str
+    with open('aicos/app/AI_AMP_2_5/bk_make_time.h', 'w', encoding='utf-8') as file:
+        file.write('const char *bk_make_timer = \"{}\";\n'.format(build_start_time_str))
 if __name__ == '__main__':
+    #创建版本.h文件
+    add_make_time_file()
     # Init global board parameters.
     get_board_config()