Move backtrace to the HAL folder (#10790)
This commit is contained in:
parent
228139eae6
commit
59f7861bcb
@ -22,10 +22,12 @@
|
|||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../core/macros.h"
|
||||||
#include "../../Marlin.h"
|
#include "../../core/serial.h"
|
||||||
#include "../../backtrace/unwinder.h"
|
#include <stdarg.h>
|
||||||
#include "../../backtrace/unwmemaccess.h"
|
|
||||||
|
#include "../backtrace/unwinder.h"
|
||||||
|
#include "../backtrace/unwmemaccess.h"
|
||||||
|
|
||||||
// Debug monitor that dumps to the Programming port all status when
|
// Debug monitor that dumps to the Programming port all status when
|
||||||
// an exception or WDT timeout happens - And then resets the board
|
// an exception or WDT timeout happens - And then resets the board
|
||||||
@ -66,7 +68,6 @@ static void TXBegin(void) {
|
|||||||
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Send character through UART with no interrupts
|
// Send character through UART with no interrupts
|
||||||
static void TX(char c) {
|
static void TX(char c) {
|
||||||
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
|
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
|
||||||
@ -333,4 +334,4 @@ __attribute__((naked)) void RSTC_Handler(void) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
#include "unwinder.h"
|
#include "unwinder.h"
|
||||||
#include "unwmemaccess.h"
|
#include "unwmemaccess.h"
|
||||||
#include "../Marlin.h"
|
|
||||||
|
#include "../../core/serial.h"
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
// Dump a backtrace entry
|
// Dump a backtrace entry
|
||||||
static bool UnwReportOut(void* ctx, const UnwReport* bte) {
|
static bool UnwReportOut(void* ctx, const UnwReport* bte) {
|
@ -171,5 +171,5 @@ bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * c
|
|||||||
}
|
}
|
||||||
else return false; // Not in the hash, and failed to read from memory
|
else return false; // Not in the hash, and failed to read from memory
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#endif // __arm__ || __thumb__
|
@ -140,8 +140,4 @@ bool UnwMemWriteRegister(UnwState * const state, const uint32_t addr, const RegD
|
|||||||
bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * const reg);
|
bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * const reg);
|
||||||
void UnwMemHashGC(UnwState * const state);
|
void UnwMemHashGC(UnwState * const state);
|
||||||
|
|
||||||
#endif /* UNWARM_H */
|
#endif // UNWARM_H
|
||||||
|
|
||||||
/* END OF FILE */
|
|
||||||
|
|
||||||
|
|
@ -593,4 +593,5 @@ UnwResult UnwStartArm(UnwState * const state) {
|
|||||||
|
|
||||||
return UNWIND_UNSUPPORTED;
|
return UNWIND_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif // __arm__ || __thumb__
|
@ -1124,5 +1124,4 @@ UnwResult UnwStartThumb(UnwState * const state) {
|
|||||||
return UNWIND_SUCCESS;
|
return UNWIND_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // __arm__ || __thumb__
|
||||||
|
|
@ -438,5 +438,4 @@ UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // __arm__ || __thumb__
|
||||||
|
|
@ -31,6 +31,4 @@ typedef struct {
|
|||||||
|
|
||||||
UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
|
UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
|
||||||
|
|
||||||
#endif
|
#endif // UNWARMBYTAB_H
|
||||||
|
|
||||||
/* END OF FILE */
|
|
@ -19,7 +19,6 @@
|
|||||||
#include "unwarmmem.h"
|
#include "unwarmmem.h"
|
||||||
#include "unwarm.h"
|
#include "unwarm.h"
|
||||||
|
|
||||||
|
|
||||||
#define M_IsIdxUsed(a, v) (((a)[v >> 3] & (1 << (v & 0x7))) ? true : false)
|
#define M_IsIdxUsed(a, v) (((a)[v >> 3] & (1 << (v & 0x7))) ? true : false)
|
||||||
#define M_SetIdxUsed(a, v) ((a)[v >> 3] |= (1 << (v & 0x7)))
|
#define M_SetIdxUsed(a, v) ((a)[v >> 3] |= (1 << (v & 0x7)))
|
||||||
#define M_ClrIdxUsed(a, v) ((a)[v >> 3] &= ~(1 << (v & 0x7)))
|
#define M_ClrIdxUsed(a, v) ((a)[v >> 3] &= ~(1 << (v & 0x7)))
|
||||||
@ -115,4 +114,5 @@ void UnwMemHashGC(UnwState * const state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif // __arm__ || __thumb__
|
Loading…
Reference in New Issue
Block a user