} diag_msg_para_t;\r
\r
#if defined(SAVE_EXC_INFO) && (CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES)\r
-static const char *g_bt_exc_info_path = "/user/exc/bt_exc_info.bin";\r
+static const char *g_bt_exc_info_path = "/user/exc/bt_exc_info_%d.bin";\r
#endif\r
oam_cmd_handle_callback g_diag_debug_proc = NULL;\r
uint8_t g_recv_msg_step = SDT_MSG_STEP_HEAD;\r
} else if (om_msg_header->func_type == OM_MSG_TYPE_LAST) {\r
zdiag_adapt_sdt_om_last_parse(data, (uint16_t)data_len, ¶);\r
#if defined(SAVE_EXC_INFO) && (CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES)\r
- if (exc_info_write(g_bt_exc_info_path, 0, para.buf, (uint32_t)para.buf_size) < 0) {\r
+ uint32_t timestamp = get_local_timestamp();\r
+ char *str = (char *)malloc(200);\r
+ memset_s(str, 200, 0, 200);\r
+ sprintf(str, g_bt_exc_info_path, timestamp);\r
+ if (exc_info_write(str, 0, para.buf, (uint32_t)para.buf_size) < 0) {\r
dfx_log_err("exc_info_write error.\r\n");\r
}\r
#endif\r
6, 5, 4, 19, 18, 17, 16\r
};\r
#if CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES\r
-static const char *g_exc_info_path = "/user/exc/exc_info.bin";\r
+static const char *g_exc_info_path = "/user/exc/exc_info_%d.bin";\r
#endif\r
#endif\r
\r
osal_kfree(exc_info_buffer);\r
return ERRCODE_SUCC;\r
}\r
-\r
- int32_t ret = exc_info_write(g_exc_info_path, 0, (const uint8_t *)exc_info_buffer, ONE_SECTOR_SIZE);\r
+ uint32_t timestamp = get_local_timestamp();\r
+ char *str = (char *)malloc(200);\r
+ memset_s(str, 200, 0, 200);\r
+ sprintf(str, g_exc_info_path, timestamp);\r
+ int32_t ret = exc_info_write(str, 0, (const uint8_t *)exc_info_buffer, ONE_SECTOR_SIZE);\r
if (ret < 0) {\r
osal_kfree(exc_info_buffer);\r
return ERRCODE_FAIL;\r
#ifdef CFG_DRIVERS_NANDFLASH\r
nand_driver_init(SPEED_SLOW);\r
set_trans_type(TRANS_BY_CPU_SINGLE_LINE);\r
- ret = exc_info_write(g_exc_info_path, 0, (const uint8_t *)exc_info_save, exc_size);\r
+ uint32_t timestamp = get_local_timestamp();\r
+ char *str = (char *)malloc(200);\r
+ memset_s(str, 200, 0, 200);\r
+ sprintf(str, g_exc_info_path, timestamp);\r
+ ret = exc_info_write(str, 0, (const uint8_t *)exc_info_save, exc_size);\r
dump_all_to_file();\r
#endif\r
#ifdef CFG_DRIVERS_MMC\r
void save_btram_file_to_nand(void)
{
- const char *btram_info_path = "/user/exc/bt_ram_info.bin";
+ const char *btram_info_path = "/user/exc/bt_ram_info_%d.bin";
+ uint32_t timestamp = get_local_timestamp();
+ char *str = (char *)malloc(200);
+ memset_s(str, 200, 0, 200);
+ sprintf(str, btram_info_path, timestamp);
+
int32_t ret =
- exc_info_write(btram_info_path, 0, (uint8_t *)BT_RAM_ORIGIN_APP_MAPPING, BT_RAM_ORIGIN_APP_MAPPING_LENGTH);
+ exc_info_write(str, 0, (uint8_t *)BT_RAM_ORIGIN_APP_MAPPING, BT_RAM_ORIGIN_APP_MAPPING_LENGTH);
printf("save_btram_file_to_nand ret:%d.\r\n", ret);
}
void save_btrace_file_to_nand(void)
{
- const char *btrace_info_path = "/user/exc/btrace_info.bin";
- int32_t ret = exc_info_write(btrace_info_path, 0, (uint8_t *)BTRACE_ADDR_EXEC, BTRACE_ADDR_EXEC_LEN);
+ const char *btrace_info_path = "/user/exc/btrace_info_%d.bin";
+ uint32_t timestamp = get_local_timestamp();
+ char *str = (char *)malloc(200);
+ memset_s(str, 200, 0, 200);
+ sprintf(str, btrace_info_path, timestamp);
+ int32_t ret = exc_info_write(str, 0, (uint8_t *)BTRACE_ADDR_EXEC, BTRACE_ADDR_EXEC_LEN);
printf("save_btrace_file_to_nand ret:%d.\r\n", ret);
}
#endif