forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception handler, add assert, reduce RAM (esp8266#4187)
Move all exception strings to IRAM and out of both PMEM (illegal) and add output of any assert() failinf conditions. The exception handler may be called while the SPI interface is in a bad state. This means no PROGMEM reads are allowed, and all data and functions used must be in system RAM or IRAM. Add a new helper macro, ets_printf_P(), which places a constant string in IRAM and copies it to the stack before calling the real ets_printf(). This makes the code simpler to read as no unwieldy combinations of ets_putc/ets_printf/... are required to output anything. The old handler also mistakenly used PSTR() strings in some places, so fix those with this patch as well. Gives back ~180 bytes of heap to every sketch built as the exception handler is always included an application.
- Loading branch information
1 parent
4e2e1f2
commit 855b03c
Showing
2 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters