mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	ESP8266 Better Exception Code Names (#358)
This commit is contained in:
		| @@ -63,7 +63,7 @@ def get_idedata(config): | ||||
|  | ||||
| # ESP logs stack trace decoder, based on https://github.com/me-no-dev/EspExceptionDecoder | ||||
| ESP8266_EXCEPTION_CODES = { | ||||
|     0: "Illegal instruction", | ||||
|     0: "Illegal instruction (Is the flash damaged?)", | ||||
|     1: "SYSCALL instruction", | ||||
|     2: "InstructionFetchError: Processor internal physical address or data error during " | ||||
|        "instruction fetch", | ||||
| @@ -71,7 +71,7 @@ ESP8266_EXCEPTION_CODES = { | ||||
|     4: "Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT " | ||||
|        "register", | ||||
|     5: "Alloca: MOVSP instruction, if caller's registers are not in the register file", | ||||
|     6: "IntegerDivideByZero: QUOS, QUOU, REMS, or REMU divisor operand is zero", | ||||
|     6: "Integer Divide By Zero", | ||||
|     7: "reserved", | ||||
|     8: "Privileged: Attempt to execute a privileged operation when CRING ? 0", | ||||
|     9: "LoadStoreAlignmentCause: Load or store to an unaligned address", | ||||
| @@ -96,10 +96,8 @@ ESP8266_EXCEPTION_CODES = { | ||||
|     26: "LoadStorePrivilege: A load or store referenced a virtual address at a ring level less " | ||||
|         "than ", | ||||
|     27: "reserved", | ||||
|     28: "LoadProhibited: A load referenced a page mapped with an attribute that does not permit " | ||||
|         "loads", | ||||
|     29: "StoreProhibited: A store referenced a page mapped with an attribute that does not permit " | ||||
|         "stores", | ||||
|     28: "Access to invalid address: LOAD (wild pointer?)", | ||||
|     29: "Access to invalid address: STORE (wild pointer?)", | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -126,7 +124,7 @@ def _parse_register(config, regex, line): | ||||
|         _decode_pc(config, match.group(1)) | ||||
|  | ||||
|  | ||||
| STACKTRACE_ESP8266_EXCEPTION_TYPE_RE = re.compile(r'Exception \(([0-9]*)\):') | ||||
| STACKTRACE_ESP8266_EXCEPTION_TYPE_RE = re.compile(r'[eE]xception \((\d+)\):') | ||||
| STACKTRACE_ESP8266_PC_RE = re.compile(r'epc1=0x(4[0-9a-fA-F]{7})') | ||||
| STACKTRACE_ESP8266_EXCVADDR_RE = re.compile(r'excvaddr=0x(4[0-9a-fA-F]{7})') | ||||
| STACKTRACE_ESP32_PC_RE = re.compile(r'PC\s*:\s*(?:0x)?(4[0-9a-fA-F]{7})') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user