Skip to content

Commit 5279511

Browse files
committed
add call trace max depth
1 parent 6266c18 commit 5279511

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Inc/HALAL/Benchmarking_toolkit/HardfaultTrace.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define HF_FLAG_VALUE (0xFF00FF00U) //Flag to know if already is written information in the flash
1010
#define METADATA_FLASH_SIZE (0X100U)
1111
#define HARD_FAULT_FLASH_SIZE (0X200U)
12+
#define CALL_TRACE_MAX_DEPTH 16
1213
typedef struct __attribute__((packed)) ContextStateFrame {
1314
uint32_t r0;
1415
uint32_t r1;
@@ -37,15 +38,17 @@ typedef struct __attribute__((packed)) HardFaultLog{
3738
uint32_t MMAR_VALID;
3839
uint32_t BFAR_VALID;
3940
}fault_address;
40-
}HardFaultLog; // 44 bytes this estructure
41-
// static void LED_init(void);
42-
// static void LED_Blink(uint32_t delay_ms);
43-
// static uint8_t HF_FLASH(void);
41+
struct __attribute__((packed)){
42+
uint32_t depth;
43+
uint32_t pcs[CALL_TRACE_MAX_DEPTH];
44+
}CallTrace;
45+
}HardFaultLog; // 112 bytes this estructure
46+
47+
4448
#ifdef __cplusplus
4549
extern "C" {
4650
#endif
4751
void Hard_fault_check(void);
48-
4952
#ifdef __cplusplus
5053
}
5154
#endif

0 commit comments

Comments
 (0)