arm: move trace dump to crash handler

This commit is contained in:
2022-06-19 09:48:28 +02:00
parent ec024adfff
commit 02fbb1c671
3 changed files with 14 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
#include "gpio.h"
#include "itoa.h"
#include "sleep.h"
#include "trace.h"
#include "uart.h"
extern "C" uint32_t _initial_stack_pointer, _text_begin, _text_end;
@@ -80,6 +81,8 @@ void CrashHandler(Armv6mRegs* regs) {
UartWriteCrash("- Stack trace:\r\n");
StackTrace(reinterpret_cast<uint32_t*>(regs->sp));
tracing::dump();
while (1) {
gpio0->data = 0x55;
sleep(100);