Commit graph

70 commits

Author SHA1 Message Date
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
suda-morris 84b2f9f14d build and link hello-world for esp32s2beta 2019-06-11 13:07:37 +08:00
Konstantin Kondrashov 399d2d2605 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
2019-06-03 14:15:08 +08:00
Renz Christian Bagaporo ffec9d4947 components: update with build system changes 2019-05-13 19:59:17 +08:00
Michael (XIAO Xufeng) 562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Renz Christian Bagaporo 90ee405afd ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
morris f5b03c9ea3 misc adjustment of esp32 component 2019-04-03 19:57:46 +08:00
morris c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Ivan Grokhotkov 106dc05903 Merge branch 'feature/specify_includes_belonging_esp32' into 'master'
move esp32 chip specific includes to esp32/xxx.h

See merge request idf/esp-idf!4534
2019-03-21 18:34:08 +08:00
morris 956c25dedd move esp32 chip specific includes to esp32/xxx.h 2019-03-18 17:14:05 +08:00