Break out debug dump functions into their own compilation unit

This commit is contained in:
Angus Gratton 2016-05-03 15:10:46 +10:00
parent 640609c3f5
commit 52f9b13faf
4 changed files with 122 additions and 75 deletions

View file

@ -0,0 +1,29 @@
/* Functions for dumping status/debug output/etc, including fatal
* exception handling.
*
* Part of esp-open-rtos
*
* Copyright (C) 2015-2016 Superhouse Automation Pty Ltd
* BSD Licensed as described in the file LICENSE
*/
#ifndef _DEBUG_DUMPS_H
#define _DEBUG_DUMPS_H
#include <stdint.h>
/* Dump stack memory starting from stack pointer address sp. */
void dump_stack(uint32_t *sp);
/* Called from exception_vectors.S when a fatal exception occurs.
Probably not useful to be called in other contexts.
*/
void fatal_exception_handler(uint32_t *sp);
/* Dump the current exception register state.
Probably mostly useful when called from fatal exception handler.
*/
void dump_excinfo(void);
#endif