In case of heap corruption or some other major problem, dumping details
in the exception handler can cause a crash loop - so fail out if we seem
to be going in circles.
This commits adds JSON support by adding Jsmn
(http://zserge.com/jsmn.html), a minimalistic JSON parser.
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Also reduces the IRAM footprint of the fatal exception handler, as only
the prelude (which disables interrupts & enables the flash mapping) is
in IRAM now.
Closes#54, relevant to #133.
Relies on global flags set when the user ISR is executing.
Unclear if this fixes any bugs as ISR code may not have been calling
into LWIP, but the previous implementation was broken.
newlib-xtensa revision cbe80794ed0083
This fixes a crash caused by heap operations occuring inside
ISRs. Particularly noticeable when sending a lot of network
traffic. Probably fixes#119, maybe other crashing bugs.
Configure/compile steps same as previous:
../configure --with-newlib --enable-multilib
--disable-newlib-io-c99-formats --enable-newlib-supplied-syscalls
--enable-target-optspace
--program-transform-name="s&^&xtensa-lx106-elf-&"
--disable-option-checking --with-target-subdir=xtensa-lx106-elf
--target=xtensa-lx106-elf
--prefix=/home/gus/dev/esp/rtos/open-rtos/libc/
--enable-newlib-nano-malloc --enable-newlib-nano-formatted-io --enable-newlib-reent-small --prefix=path_to/esp-open-rtos/libc
CROSS_CFLAGS="-DSIGNAL_PROVIDED -DABORT_PROVIDED" make
make install
This saves 1020 bytes from the text (IRAM) section by preventing
inlining of user_start_phase2() (and dump_flash_config_sectors() as
well) into the IRAM function sdk_user_start().
Previous behavior was all warnings were treated as errors. This is now
controllable via a make variable and defaults to off (but can be turned on in
local.mk for those who still want the old behavior)
Use onewire_addr_t for onewire addresses
Move internal defines out of onewire.h
Remove global variables for search state
use taskENTER_CRITICAL instead of portDISABLE_INTERRUPTS
remove unnecessary onewire_init function
Remove unnecessary critical sections
Use GPIO_OUT_OPEN_DRAIN
reformat/style cleanup