1 /* 2 * Copyright (c) 2020 Intel Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef DEBUG_COREDUMP_INTERNAL_H_ 8 #define DEBUG_COREDUMP_INTERNAL_H_ 9 10 #include <zephyr/toolchain.h> 11 12 /** 13 * @cond INTERNAL_HIDDEN 14 * 15 * These are for internal use only, so skip these in 16 * public documentation. 17 */ 18 19 #define COREDUMP_BEGIN_STR "BEGIN#" 20 #define COREDUMP_END_STR "END#" 21 #define COREDUMP_ERROR_STR "ERROR CANNOT DUMP#" 22 23 /* 24 * Need to prefix coredump strings to make it easier to parse 25 * as log module adds its own prefixes. 26 */ 27 #define COREDUMP_PREFIX_STR "#CD:" 28 29 struct z_coredump_memory_region_t { 30 uintptr_t start; 31 uintptr_t end; 32 }; 33 34 extern struct z_coredump_memory_region_t z_coredump_memory_regions[]; 35 36 /** 37 * @brief Mark the start of coredump 38 * 39 * This sets up coredump subsys so coredump can be commenced. 40 * 41 * For example, backend needs to be initialized before any 42 * output can be stored. 43 */ 44 void z_coredump_start(void); 45 46 /** 47 * @brief Mark the end of coredump 48 * 49 * This tells the coredump subsys to finalize the coredump 50 * session. 51 * 52 * For example, backend may need to flush the output. 53 */ 54 void z_coredump_end(void); 55 56 /** 57 * @endcond 58 */ 59 60 #endif /* DEBUG_COREDUMP_INTERNAL_H_ */ 61