Commit Graph

79 Commits

Author SHA1 Message Date
Ivan Grokhotkov
5eebdd1de2 espcoredump: fix exception when -thread-info fails
GDB "-thread-info N" command (for a specific thread N) may fail if
GDB can not perform a backtrace. At the same time, "-thread-info"
command succeeds in this situation, returning information for all
threads.
Replace repeated calls to "-thread-info N" with a single call to
"-thread-info", also reducing the total execution time.
2020-10-02 16:54:32 +02:00
Mahavir Jain
237087a5ca espcoredump: remove ESP32 prefix from config options
- This component is applicable for ESP32 and ESP32-S2, hence the change
- Backward compatibility is maintained using `sdkconfig.rename` file
2020-09-30 20:22:27 +05:30
Ivan Grokhotkov
767235ba6d Merge branch 'bugfix/coredump_temp_files_del' into 'master'
coredump: temp-files delete fix

See merge request espressif/esp-idf!9511
2020-09-14 16:05:28 +08:00
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Andrei Gramakov
48c4378a70 coredump: temp-files delete fix 2020-08-04 09:15:30 +02:00
Ivan Grokhotkov
8ac56e904b Merge branch 'bugfix/coredump_esp_panic_reason' into 'master'
Coredump ESP panic reason

See merge request espressif/esp-idf!9072
2020-07-28 23:49:10 +08:00
Alexey Gerenkov
cae41db8b8 coredump: Fixes core dump private header inclusion guard 2020-07-27 21:38:34 +03:00
Alexey Gerenkov
21091c6b0e coredump: Fixes ESP-specific panic reasons handling 2020-07-27 21:38:33 +03:00
morris
2917651478 esp_rom: extract common ets apis into esp_rom_sys.h 2020-07-27 15:27:01 +08:00
Roland Dobai
ee5e3f8b93 CI: Fix timeout in the espcoredump test 2020-07-08 11:10:43 +02:00
morris
a34409cffc esp_rom: extract common CRC apis into esp_rom_crc.h 2020-06-23 16:40:14 +08:00
Ivan Grokhotkov
c140a66d3d Merge branch 'feature/coredump_pygdbmi' into 'master'
espcoredump: use pygdbmi for interaction with GDB

Closes IDF-48

See merge request espressif/esp-idf!8841
2020-06-23 01:44:45 +08:00
Ivan Grokhotkov
3ffacb04b9 Merge branch 'bugfix/espcoredump_fix_error_reported_for_blank_partition' into 'master'
espcoredump: fix error reported for blank partition

Closes IDF-1727

See merge request espressif/esp-idf!8801
2020-06-22 15:54:19 +08:00
Alex Lisitsyn
0d85e0096c espcoredump: fix error reported for blank partition 2020-06-22 15:54:18 +08:00
Ivan Grokhotkov
cbd1a95fd0 espcoredump: simplify handling of temporary files 2020-06-18 19:08:00 +02:00
Ivan Grokhotkov
a63f44cfda espcoredump: use pygdbmi for interaction with GDB
IDF now includes pygdbmi package as a dependency, so we can use it
for core dump parsing.
2020-06-18 19:07:59 +02:00
Krzysztof Budzynski
79a0e892a0 Merge branch 'feature/coredump_allow_variable_dumping' into 'master'
Added coredump user defined variable into coredump

Closes IDF-44

See merge request espressif/esp-idf!8730
2020-06-15 02:35:38 +08:00
Alexey Gerenkov
1deeadf4c5 Added coredump user defined variable into coredump 2020-06-15 02:35:38 +08:00
Ivan Grokhotkov
8526cb577c Merge branch 'bugfix/coredump_workaround_esp32s2_sha256_support' into 'master'
Limit coredump SHA256 support for ESP32 only

See merge request espressif/esp-idf!8817
2020-06-05 22:14:46 +08:00
Sylvio Alves
1fdc7afeb8 coredump: Limit coredump SHA256 support for ESP32 only 2020-05-29 15:25:29 -03:00
Alexey Gerenkov
cfd65df78a coredump: Fixes size of memory region used by espcoredump.py 2020-05-29 20:53:15 +03:00
Alexey Gerenkov
ef1b3330c2 coredump: Fixes coredump data overwriting due to 'TaskSnapshot_t' and 'core_dump_task_header_t' difference 2020-05-06 15:04:58 +03:00
Ivan Grokhotkov
e94288da31 global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs
Using the method from @cemeyer
(https://github.com/espressif/esp-idf/pull/3166):

find . -name \*.sh -exec sed -i "" -e 's|^#!.*bin/bash|#!/usr/bin/env bash|' {} +

Closes https://github.com/espressif/esp-idf/pull/3166.
2020-04-03 01:10:02 +02:00
Angus Gratton
62426a6c90 Merge branch 'refactor/use_new_component_registration_functions' into 'master'
CMake: Use new component registration function

See merge request espressif/esp-idf!8068
2020-03-25 08:02:42 +08:00
aleks
b3eff24458 espcoredump: update expected test output 2020-03-23 14:40:56 +00:00
Andreas Motl
dde4d2e9eb Make espcoredump more resilient when decoding specific thread stack
Merges https://github.com/espressif/esp-idf/pull/4865
2020-03-23 14:40:56 +00:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Ivan Grokhotkov
80f50471bf Merge branch 'bugfix/coredump_no_ext_stacks' into 'master'
core dump: don't allow core dumps to Flash if PSRAM is used for stacks

See merge request espressif/esp-idf!7835
2020-03-07 18:07:10 +08:00
Alex Lisitsyn
3efa8d7a97 core dump: add ESP32-S2 support 2020-03-03 23:37:45 +08:00
Ivan Grokhotkov
4f32a06f87 core dump: don't allow core dumps to Flash if PSRAM is used for stacks
It is not possible to write to Flash when the stack is located in
PSRAM, and it is not possible to write PSRAM buffers into Flash when
malloc can not be used.
2020-03-02 14:43:05 +01:00
Ivan Grokhotkov
25041ba583 tools/idf_monitor: automatically decode UART core dumps
This adds detection of UART core dumps to IDF monitor. By default,
core dumps are not printed to the console, but are processed by
espcoredump.py using 'info_corefile' command. The result is printed
to stdout.

This feature can be disabled in menuconfig.

In the future this can be extended to allow running espcoredump.py
with 'dbg_corefile' argument, which is similar to the current GDB Stub
behavior.

Related to IDF-52.
2020-02-13 18:46:26 +01:00
morris
e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
morris
1c2cc5430e global: bring up esp32s2(not beta) 2020-01-16 17:41:31 +08:00
Ivan Grokhotkov
a559014ff0 Merge branch 'bugfix/coredump_bin_fmt_ver_update' into 'master'
Fixes coredump compatibility with legacy binary core dumps

See merge request espressif/esp-idf!6794
2020-01-10 10:04:17 +08:00
Ivan Grokhotkov
37a8ff9040 core dump: only get EPC/EPS registers up to XCHAL_NUM_INTLEVELS 2019-12-19 16:47:57 +01:00
Alexey Gerenkov
e092d6f858 coredump: Makes compatible with legacy binary core dumps
Also:
 - improves coredump versioning scheme
 - Moves some API funtions to respective flash/UART dependent code
2019-11-25 22:44:51 +03:00
Alexey Gerenkov
27ce4d13df coredump: change data format to ELF 2019-11-22 13:25:43 +08:00
Ivan Grokhotkov
9a2af7ae33 global: remove gcc 5.2 support 2019-11-20 11:17:27 +01:00
Angus Gratton
adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Angus Gratton
438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Michael (XIAO Xufeng)
9d30b04f68 coredump: use esp_flash api in coredump
Also put esp_flash functions into noflash region, when
ESP32_PANIC_HANDLER_IRAM and coredump are enabled. The option disables
the re-enabling of the CPU-cache when it's disabled during coredump.
This requires all the coredump functions including the flash API to be
in the D/IRAM.
2019-09-14 17:02:08 +08:00
Michael (XIAO Xufeng)
511820820e esp_flash: fix the coredump issue
During coredump, dangerous-area-checking should be disabled, and cache
disabling should be replaced by a safer version.

Dangerous-area-checking used to be in the HAL, but it seems to be more
fit to os functions. So it's moved to os functions. Interfaces are
provided to switch between os functions during coredump.
2019-09-14 17:01:36 +08:00
Michael (XIAO Xufeng)
6139864a4c esp_flash: fix coredump for legacy spi flash API
When legacy mode is used, the coredump still fails during linking
because "esp_flash_init_default_chip", "esp_flash_app_init" and
"esp_flash_default_chip " are not compiled and linked.

Instead of using ``if`` macros in callers, these functions are protected
by ``if`` macros in the header, and also not compiled in the sources.
"esp_flash_default_chip" variable is compiled with safe default value.
2019-09-14 16:56:31 +08:00
Alex Lisitsyn
7ff9538c48 espcoredump: fix issue with spi_flash access
spi_flash has been updated and its functions work from flash by default instead of IRAM that cause issue
add Kconfig value into espcoredump to enable spi_flash legacy mode (CONFIG_SPI_FLASH_USE_LEGACY_IMPL) when core dump is selected
fix spi_flash issues to work correctly with legacy mode when CONFIG_SPI_FLASH_USE_LEGACY_IMPL is used
2019-09-06 15:37:55 +08:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton
24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
Renz Christian Bagaporo
9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Darian Leung
037c079e9a esp32: Refactor backtrace and add esp_backtrace_print()
This commit refactors backtracing within the panic handler so that a common
function esp_backtrace_get_next_frame() is used iteratively to traverse a
callstack.

A esp_backtrace_print() function has also be added that allows the printing
of a backtrace at runtime. The esp_backtrace_print() function allows unity to
print the backtrace of failed test cases and jump back to the main test menu
without the need reset the chip. esp_backtrace_print() can also be used as a
debugging function by users.

- esp_stack_ptr_is_sane() moved to soc_memory_layout.h
- removed uncessary includes of "esp_debug_helpers.h"
2019-06-19 18:30:18 +08:00