WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
crash_data.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2024-2024. All rights reserved.
3 * Description: crash data
4 */
5
6#ifndef CRASH_DATA_H
7#define CRASH_DATA_H
8#include "exception.h"
9#include "panic.h"
10
11#ifdef SUPPORT_CRASH_DATA_RAM
12#define CRASH_MAX_CALL_STACK 64
13
14typedef struct {
15 uint8_t core;
16 uint8_t save_after_reboot;
17 uint8_t padding[2];
18 uint32_t time_s;
21 exc_info_save_t exc_info_save;
22 uint8_t stack[CRASH_MAX_CALL_STACK * EXC_STACK_INFO_SIZE];
23} crash_data_t;
24
25#ifdef SAVE_EXC_INFO
26#if CONFIG_DFX_SUPPORT_FILE_SYSTEM == DFX_YES
31int32_t crash_data_write(const char *path, uint32_t offset, const uint8_t *buf, uint32_t size);
32#endif
33#ifdef CFG_DRIVERS_MMC
38errcode_t crash_data_write_emmc(void);
39#endif
40errcode_t crash_data_save(void);
41#endif
42
43void crash_data_clear(void);
44
45void crash_data_set_save_after_reboot(void);
46
47void crash_data_set_time_s(void);
48
49exc_info_save_t *crash_data_get_exc_info_save(void);
50void crash_data_set_exc_info_save(exc_info_save_t *exc_info_save, uint16_t stack_size);
51
52exception_info_t *crash_data_get_exception_info(void);
53void crash_data_set_exception_info(exception_info_t *exception_info);
54
55panic_desc_t *crash_data_get_panic(void);
56void crash_data_set_panic(panic_desc_t *panic);
57#endif
58#endif
#define EXC_STACK_INFO_SIZE
Definition exception_riscv.c:82
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
void panic(panic_id_t source, uint32_t code)
Enter into infinite loop so that a debugger can break in and see the stack trace
Definition panic_rom.c:44
Definition exception.h:195
Definition exception.h:99
Definition plat_exception_rst.h:181
Definition panic.h:109