PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Go to the source code of this file.
Classes | |
struct | _stack_s |
struct | stack_t |
struct | proc_regs_s |
struct | info_s |
struct | fullcontext_s |
Typedefs | |
typedef uint32_t | stack_word_t |
Enumerations | |
enum | fault_flags_t { eRegsPresent = 0x01, eUserStackPresent = 0x02, eIntStackPresent = 0x04, eInvalidUserStackPtr = 0x20, eInvalidIntStackPrt = 0x40 } |
Functions | |
__BEGIN_DECLS int | hardfault_check_status (char *caller) weak_function |
int | hardfault_write (char *caller, int fd, int format, bool rearm) weak_function |
int | hardfault_rearm (char *caller) weak_function |
int | hardfault_increment_reboot (char *caller, bool reset) weak_function |
#define BBSRAM_FIXED_ELEMENTS_SIZE (sizeof(info_s)) |
Definition at line 72 of file hardfault_log.h.
#define BBSRAM_HEADER_SIZE 20 /* This is an assumption */ |
Definition at line 64 of file hardfault_log.h.
#define BBSRAM_LEFTOVER (BBSRAM_REAMINING-BBSRAM_FIXED_ELEMENTS_SIZE) |
Definition at line 73 of file hardfault_log.h.
#define BBSRAM_NUMBER_STACKS 1 |
Definition at line 68 of file hardfault_log.h.
#define BBSRAM_PATH "/fs/bbr" |
Definition at line 79 of file hardfault_log.h.
#define BBSRAM_REAMINING (PX4_BBSRAM_SIZE-BBSRAM_USED) |
Definition at line 66 of file hardfault_log.h.
#define BBSRAM_SIZE_FN0 (sizeof(int)) |
Definition at line 53 of file hardfault_log.h.
#define BBSRAM_SIZE_FN1 384 /* greater then 2.5 times the size of vehicle_status_s */ |
Definition at line 54 of file hardfault_log.h.
#define BBSRAM_SIZE_FN2 384 /* greater then 2.5 times the size of vehicle_status_s */ |
Definition at line 55 of file hardfault_log.h.
#define BBSRAM_SIZE_FN3 HARDFAULT_MAX_ULOG_FILE_LEN |
Definition at line 56 of file hardfault_log.h.
#define BBSRAM_SIZE_FN4 -1 |
Definition at line 57 of file hardfault_log.h.
#define BBSRAM_USED ((5*BBSRAM_HEADER_SIZE)+(BBSRAM_SIZE_FN0+BBSRAM_SIZE_FN1+BBSRAM_SIZE_FN2+BBSRAM_SIZE_FN3)) |
Definition at line 65 of file hardfault_log.h.
#define BSRAM_FILE_SIZES |
Definition at line 81 of file hardfault_log.h.
#define CONFIG_ISTACK_SIZE (BBSRAM_LEFTOVER/BBSRAM_NUMBER_STACKS/sizeof(stack_word_t)) |
Definition at line 75 of file hardfault_log.h.
Referenced by write_intterupt_stack().
#define CONFIG_USTACK_SIZE (BBSRAM_LEFTOVER/BBSRAM_NUMBER_STACKS/sizeof(stack_word_t)) |
Definition at line 76 of file hardfault_log.h.
Referenced by write_user_stack().
#define HARDFAULT_DISPLAY_FORMAT 1 |
Definition at line 119 of file hardfault_log.h.
Referenced by hardfault_dowrite(), and hardfault_write().
#define HARDFAULT_FILE_FORMAT 0 |
Definition at line 120 of file hardfault_log.h.
Referenced by hardfault_commit(), hardfault_dowrite(), and hardfault_write().
#define HARDFAULT_FILENO 4 |
Definition at line 48 of file hardfault_log.h.
#define HARDFAULT_MAX_ULOG_FILE_LEN 64 /* must be large enough to store the full path to the log file */ |
Definition at line 51 of file hardfault_log.h.
Referenced by hardfault_append_to_ulog(), and px4::logger::LogWriterFile::hardfault_store_filename().
#define HARDFAULT_PATH BBSRAM_PATH "" STRINGIFY(HARDFAULT_FILENO) |
Definition at line 49 of file hardfault_log.h.
Referenced by hardfault_check_status(), hardfault_dowrite(), hardfault_get_desc(), and hardfault_rearm().
#define HARDFAULT_REBOOT_FILENO 0 |
Definition at line 44 of file hardfault_log.h.
#define HARDFAULT_REBOOT_PATH BBSRAM_PATH "" STRINGIFY(HARDFAULT_REBOOT_FILENO) |
Definition at line 45 of file hardfault_log.h.
Referenced by hardfault_increment_reboot().
#define HARDFAULT_ULOG_FILENO 3 |
Definition at line 46 of file hardfault_log.h.
#define HARDFAULT_ULOG_PATH BBSRAM_PATH "" STRINGIFY(HARDFAULT_ULOG_FILENO) |
Definition at line 47 of file hardfault_log.h.
Referenced by hardfault_append_to_ulog(), and px4::logger::LogWriterFile::hardfault_store_filename().
#define HEADER_TIME_FMT "%Y-%m-%d-%H:%M:%S" |
Definition at line 112 of file hardfault_log.h.
Referenced by hardfault_check_status(), write_dump_info(), and write_dump_time().
#define HEADER_TIME_FMT_LEN (((arraySize(HEADER_TIME_FMT)-1) + HEADER_TIME_FMT_NUM)) |
Definition at line 114 of file hardfault_log.h.
Referenced by genfault().
#define HEADER_TIME_FMT_NUM (2+ 0+ 0+ 0+ 0+ 0) |
Definition at line 113 of file hardfault_log.h.
#define LOG_NAME_FMT "fault_%s.log" |
Definition at line 102 of file hardfault_log.h.
Referenced by format_fault_file_name().
#define LOG_NAME_LEN ((arraySize(LOG_NAME_FMT)-1) + LOG_NAME_NUM) |
Definition at line 104 of file hardfault_log.h.
Referenced by format_fault_file_name().
#define LOG_NAME_NUM ( -2 ) |
Definition at line 103 of file hardfault_log.h.
#define LOG_PATH_BASE "/fs/microsd/" |
Definition at line 99 of file hardfault_log.h.
Referenced by format_fault_file_name().
#define LOG_PATH_BASE_LEN ((arraySize(LOG_PATH_BASE))-1) |
Definition at line 100 of file hardfault_log.h.
Referenced by format_fault_file_name().
#define LOG_PATH_LEN ((LOG_PATH_BASE_LEN + LOG_NAME_LEN + TIME_FMT_LEN)) |
Definition at line 110 of file hardfault_log.h.
Referenced by format_fault_file_name(), and hardfault_commit().
#define MAX_FILE_PATH_LENGTH 40 |
Definition at line 91 of file hardfault_log.h.
#define TIME_FMT "%Y_%m_%d_%H_%M_%S" |
Definition at line 106 of file hardfault_log.h.
Referenced by format_fault_file_name().
#define TIME_FMT_LEN (((arraySize(TIME_FMT)-1) + TIME_FMT_NUM)) |
Definition at line 108 of file hardfault_log.h.
Referenced by format_fault_file_name(), format_fault_time(), genfault(), hardfault_check_status(), write_dump_info(), and write_dump_time().
#define TIME_FMT_NUM (2+ 0+ 0+ 0+ 0+ 0) |
Definition at line 107 of file hardfault_log.h.
typedef uint32_t stack_word_t |
Definition at line 127 of file hardfault_log.h.
enum fault_flags_t |
Enumerator | |
---|---|
eRegsPresent | |
eUserStackPresent | |
eIntStackPresent | |
eInvalidUserStackPtr | |
eInvalidIntStackPrt |
Definition at line 228 of file hardfault_log.h.
__BEGIN_DECLS int hardfault_check_status | ( | char * | caller | ) |
Definition at line 985 of file hardfault_log.c.
References arraySize, fd, format_fault_time(), hardfault_get_desc(), HARDFAULT_PATH, hardfault_rearm(), HEADER_TIME_FMT, identify(), OK, state, and TIME_FMT_LEN.
Referenced by hardfault_log_main().
int hardfault_increment_reboot | ( | char * | caller, |
bool | reset | ||
) |
Definition at line 1038 of file hardfault_log.c.
References fd, HARDFAULT_REBOOT_PATH, identify(), OK, read(), and write().
Referenced by hardfault_log_main().
int hardfault_rearm | ( | char * | caller | ) |
Definition at line 964 of file hardfault_log.c.
References HARDFAULT_PATH, identify(), and OK.
Referenced by hardfault_check_status(), hardfault_log_main(), and hardfault_write().
int hardfault_write | ( | char * | caller, |
int | fd, | ||
int | format, | ||
bool | rearm | ||
) |
Definition at line 1085 of file hardfault_log.c.
References HARDFAULT_DISPLAY_FORMAT, hardfault_dowrite(), HARDFAULT_FILE_FORMAT, hardfault_get_desc(), hardfault_rearm(), identify(), and OK.
Referenced by hardfault_commit().