Commit graph

20 commits

Author SHA1 Message Date
Angus Gratton d6f183fbb9 esp_err: Use separate code path for ESP_ERROR_CHECK assertion
* Minimum code size overhead
* Makes function safe to use when flash cache is disabled

Builds on #339 https://github.com/espressif/esp-idf/pull/339
2017-03-03 15:33:23 +11:00
Alexey Gerenkov 04acc88023 esp32: Fixes watchdog problem when printing core dump to uart
Also fixes generation of core dumps when flash cache is disabled
2017-02-01 18:39:28 +03:00
Ivan Grokhotkov 6538252552 Merge branch 'bugfix/panic_reset_hangs' into 'master'
Panic handler: Use same reset path as esp_restart(), disabling hardware

Closes #223 https://github.com/espressif/esp-idf/issues/223

See merge request !417
2017-01-16 10:40:47 +08:00
Jeroen Domburg 08f11e4c53 Fix panic register dump format 2017-01-15 16:49:18 +08:00
Angus Gratton e53d307814 Panic handler: Use same reset path as esp_restart(), disabling hardware
Closes #223 https://github.com/espressif/esp-idf/issues/223
2017-01-13 14:37:36 +11:00
Alexey Gerenkov ad66fbe5ad esp32: Fixes issues discussed during code review of MR!341
The following issues mentioned during MR!341 review were fixed:
1) Core dump test application description
2) Usage of CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH and CONFIG_ESP32_ENABLE_COREDUMP_TO_UART
3) FLASH_GUARD_START macro usage is fixed in flash API
4) Core dump module logging facility
5) cache util functions doc updated
6) interactive delay before print core dump to uart
7) core dump partion support in build system
2017-01-12 19:38:19 +03:00
Alexey Gerenkov 39ddc7b836 esp32: Fixes several issues in core dump feature
1) PS is fixed up to allow GDB backtrace to work properly
2) MR!341 discussion: in core dump module: esp_panicPutXXX was replaced by ets_printf.
3) MR!341 discussion: core dump flash magic number was changed.
4) MR!341 discussion: SPI flash access API was redesigned to allow flexible critical section management.
5) test app for core dump feature was added
6) fixed base64 file reading issues on Windows platform
7) now raw bin core file is deleted upon core loader failure by epscoredump.py
2017-01-11 20:51:28 +03:00
Alexey Gerenkov 4a3e160888 esp32: Add core dump saving to flash feature
Complimentary changes:
1) Partition table definitions files with core dump partition
2) Special sub-type for core dump partition
3) Special version of spi_flash_xxx
4) espcoredump.py is script to get core dump from flash and print useful info
5) FreeRTOS API was extended to get tasks snapshots
2017-01-11 20:51:28 +03:00
Jeroen Domburg 881157e1ed Add documentation to panic handler functions, move watchpoint stuff from tasks.c to port.c, account for non-32-bytes-aligned stacks when setting watchpoint, add debug reason explanation to panic handler 2017-01-10 13:05:19 +08:00
Jeroen Domburg ca57a86f20 Add option to automatically set a watchpoint at the end of the swapped-in task 2017-01-09 16:42:45 +08:00
Angus Gratton da977149f6 panic handlers: Print the PC address where abort() was called, don't dump registers 2016-12-28 10:09:40 +11:00
Angus Gratton b98405f9d9 esp32: ReformatReformat panic.c (remove tabs, etc) 2016-12-07 13:25:56 -08:00
Deomid Ryabkov 20fd57f147 Add backtrace to exception output.
On Xtensa windowed ABI backtrace is easy to do, and it's immensely
useful for debugging, so - do it by default.
We try to be careful and not deref bogus pointers while walking the
frames.

Example output (from debugging espressif/esp-idf#133):

Backtrace: 0x1:0x3ffc51e0 0x400e9dfa:0x3ffc5210 0x400e9ebc:0x3ffc5230 0x400ec487:0x3ffc5260

With just addr2line utility from binutils, this already pinpoints the
location of the crash.
2016-12-07 19:58:06 +00:00
Jeroen Domburg c852e9958b Invoke panic handler when a stack overflow has been detected; unhandled interrupt now prints interrupt/cpu number. 2016-12-05 20:37:59 +08:00
Ivan Grokhotkov 8b2f933a51 Implement system_* APIs in IDF 2016-11-22 21:14:36 +08:00
Jeroen Domburg 309bd12855 Re-add panic.o to IRAM/DRAM. 2016-10-28 14:32:11 +08:00
Jeroen Domburg ff6b8addd9 Fix panic config ifdefs, un-stall app cpu on boot so it restarts after panic 2016-10-27 11:17:24 +08:00
Jeroen Domburg 9546ad5b5e Move write key and stage action select constants into headers 2016-10-26 14:54:50 +08:00
Jeroen Domburg 7d254eb3f0 Move panic handler and gdbstub into esp32 component, clean up wdt according to merge req suggestions 2016-10-26 12:23:01 +08:00
Jeroen Domburg 1ca97f5adb Move panic handler code from FreeRTOS to esp32 component 2016-10-26 11:06:53 +08:00
Renamed from components/freertos/panic.c (Browse further)