__init__.py 931 B

1234567891011121314151617181920212223242526272829303132333435
  1. import re
  2. # regex matches an potential PC value (0x4xxxxxxx)
  3. MATCH_PCADDR = re.compile(r'0x4[0-9a-f]{7}', re.IGNORECASE)
  4. DEFAULT_TOOLCHAIN_PREFIX = 'xtensa-esp32-elf-'
  5. DEFAULT_PRINT_FILTER = ''
  6. # coredump related messages
  7. COREDUMP_UART_START = b'================= CORE DUMP START ================='
  8. COREDUMP_UART_END = b'================= CORE DUMP END ================='
  9. COREDUMP_UART_PROMPT = b'Press Enter to print core dump to UART...'
  10. # coredump states
  11. COREDUMP_IDLE = 0
  12. COREDUMP_READING = 1
  13. COREDUMP_DONE = 2
  14. # coredump decoding options
  15. COREDUMP_DECODE_DISABLE = 'disable'
  16. COREDUMP_DECODE_INFO = 'info'
  17. # panic handler related messages
  18. PANIC_START = r'Core \s*\d+ register dump:'
  19. PANIC_END = b'ELF file SHA256:'
  20. PANIC_STACK_DUMP = b'Stack memory:'
  21. # panic handler decoding states
  22. PANIC_IDLE = 0
  23. PANIC_READING = 1
  24. # panic handler decoding options
  25. PANIC_DECODE_DISABLE = 'disable'
  26. PANIC_DECODE_BACKTRACE = 'backtrace'