SingingCat 0
application
constants.h
1#ifndef CONSTANTS_H
2#define CONSTANTS_H 1
3#include "main-header.h"
4typedef struct consts {
5 uint32_t magic; // 'SCCO'
6 uint32_t crc32;
7 void * last_return_address;
8 void * failing_address;
9 uint32_t CFSR;
10 uint32_t SHCSR;
11 uint32_t MMFAR;
12 uint32_t HFSR;
13 uint32_t BFAR;
14 uint32_t reset_counter;
15 uint8_t end_of_checksum; // last one to be checksummed
16 uint8_t in_user_app;
18
19#define CONSTANTS_MAGIC 0x5343434F
20struct consts *constants() __attribute__((no_instrument_function));
21int constants_init();
22void constants_validate();
23void constants_print();
24#endif