Browse Source

Move backtrace to the HAL folder (#10790)

pull/1/head
Scott Lahteine 7 years ago
committed by GitHub
parent
commit
59f7861bcb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
  2. 4
      Marlin/src/HAL/backtrace/backtrace.cpp
  3. 0
      Marlin/src/HAL/backtrace/backtrace.h
  4. 2
      Marlin/src/HAL/backtrace/unwarm.cpp
  5. 6
      Marlin/src/HAL/backtrace/unwarm.h
  6. 3
      Marlin/src/HAL/backtrace/unwarm_arm.cpp
  7. 3
      Marlin/src/HAL/backtrace/unwarm_thumb.cpp
  8. 3
      Marlin/src/HAL/backtrace/unwarmbytab.cpp
  9. 4
      Marlin/src/HAL/backtrace/unwarmbytab.h
  10. 4
      Marlin/src/HAL/backtrace/unwarmmem.cpp
  11. 0
      Marlin/src/HAL/backtrace/unwarmmem.h
  12. 0
      Marlin/src/HAL/backtrace/unwinder.cpp
  13. 0
      Marlin/src/HAL/backtrace/unwinder.h
  14. 0
      Marlin/src/HAL/backtrace/unwmemaccess.cpp
  15. 0
      Marlin/src/HAL/backtrace/unwmemaccess.h

13
Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp

@ -22,10 +22,12 @@
#ifdef ARDUINO_ARCH_SAM
#include "../../inc/MarlinConfig.h"
#include "../../Marlin.h"
#include "../../backtrace/unwinder.h"
#include "../../backtrace/unwmemaccess.h"
#include "../../core/macros.h"
#include "../../core/serial.h"
#include <stdarg.h>
#include "../backtrace/unwinder.h"
#include "../backtrace/unwmemaccess.h"
// Debug monitor that dumps to the Programming port all status when
// 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;
}
// Send character through UART with no interrupts
static void TX(char c) {
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

4
Marlin/src/backtrace/backtrace.cpp → Marlin/src/HAL/backtrace/backtrace.cpp

@ -26,7 +26,9 @@
#include "unwinder.h"
#include "unwmemaccess.h"
#include "../Marlin.h"
#include "../../core/serial.h"
#include <stdarg.h>
// Dump a backtrace entry
static bool UnwReportOut(void* ctx, const UnwReport* bte) {

0
Marlin/src/backtrace/backtrace.h → Marlin/src/HAL/backtrace/backtrace.h

2
Marlin/src/backtrace/unwarm.cpp → Marlin/src/HAL/backtrace/unwarm.cpp

@ -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
}
#endif
#endif // __arm__ || __thumb__

6
Marlin/src/backtrace/unwarm.h → Marlin/src/HAL/backtrace/unwarm.h

@ -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);
void UnwMemHashGC(UnwState * const state);
#endif /* UNWARM_H */
/* END OF FILE */
#endif // UNWARM_H

3
Marlin/src/backtrace/unwarm_arm.cpp → Marlin/src/HAL/backtrace/unwarm_arm.cpp

@ -593,4 +593,5 @@ UnwResult UnwStartArm(UnwState * const state) {
return UNWIND_UNSUPPORTED;
}
#endif
#endif // __arm__ || __thumb__

3
Marlin/src/backtrace/unwarm_thumb.cpp → Marlin/src/HAL/backtrace/unwarm_thumb.cpp

@ -1124,5 +1124,4 @@ UnwResult UnwStartThumb(UnwState * const state) {
return UNWIND_SUCCESS;
}
#endif
#endif // __arm__ || __thumb__

3
Marlin/src/backtrace/unwarmbytab.cpp → Marlin/src/HAL/backtrace/unwarmbytab.cpp

@ -438,5 +438,4 @@ UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void
return err;
}
#endif
#endif // __arm__ || __thumb__

4
Marlin/src/backtrace/unwarmbytab.h → Marlin/src/HAL/backtrace/unwarmbytab.h

@ -31,6 +31,4 @@ typedef struct {
UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
#endif
/* END OF FILE */
#endif // UNWARMBYTAB_H

4
Marlin/src/backtrace/unwarmmem.cpp → Marlin/src/HAL/backtrace/unwarmmem.cpp

@ -19,7 +19,6 @@
#include "unwarmmem.h"
#include "unwarm.h"
#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_ClrIdxUsed(a, v) ((a)[v >> 3] &= ~(1 << (v & 0x7)))
@ -115,4 +114,5 @@ void UnwMemHashGC(UnwState * const state) {
}
}
}
#endif
#endif // __arm__ || __thumb__

0
Marlin/src/backtrace/unwarmmem.h → Marlin/src/HAL/backtrace/unwarmmem.h

0
Marlin/src/backtrace/unwinder.cpp → Marlin/src/HAL/backtrace/unwinder.cpp

0
Marlin/src/backtrace/unwinder.h → Marlin/src/HAL/backtrace/unwinder.h

0
Marlin/src/backtrace/unwmemaccess.cpp → Marlin/src/HAL/backtrace/unwmemaccess.cpp

0
Marlin/src/backtrace/unwmemaccess.h → Marlin/src/HAL/backtrace/unwmemaccess.h

Loading…
Cancel
Save