Commit Graph

214 Commits

Author SHA1 Message Date
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Omar Chebib
e25cda2c40 Task WDT: Interuptee task stack is now used for backtracing, regardless of the CPU core
For RISC-V and Xtensa targets, in case a panic needs to happen when
Task WDT is triggered (ESP_TASK_WDT_PANIC), the interruptee's stack
is now used for printing the backtrace.
Abort after Task Watchdog is triggered can happen on APP CPU (second core).
2022-08-02 12:41:14 +08:00
Guillaume Souchere
6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00
Mahavir Jain
a94c74c26b
mbedtls: remove dependency on driver component
- keep `esp_pm` dependency conditional in mbedtls
- refactor `bt` cmakelist to keep dependencies as private

Related: IDF-1265
2022-07-18 21:10:51 +05:30
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
Fu Hanxi
05d2357062 feat: use standalone project idf-build-apps for find/build apps utils 2022-07-14 08:26:31 +08:00
Roland Dobai
3d1508db9d Tools: Make espcoredump.py executable
Closes https://github.com/espressif/esp-idf/issues/9319
2022-07-11 17:32:47 +02:00
Darian Leung
5de652bbe2 espcoredump: Fix espcoredump.py shebang and file mode
This commit adds back the shebang and executable file mode for
espcoredump.py
2022-07-06 21:03:11 +08:00
Cao Sen Miao
a690a87829 spi_flash: Remove legacy spi_flash drivers 2022-07-01 11:01:34 +08:00
Roland Dobai
b6e6adddc3 Merge branch 'refactor/change_copyright_components' into 'master'
components: Change copyright in components files

See merge request espressif/esp-idf!18580
2022-06-20 16:02:12 +08:00
simon.chupin
45482bd1c0 components: Change copyright in components files 2022-06-17 16:59:56 +02:00
Mahavir Jain
51bbee2e19 espcoredump: allow reserving dedicated stack size for Xtensa architecture
Core issue with SET_STACK was fixed with e543e97c7b

Related: IDF-2797
2022-06-06 03:24:50 +00:00
Michael (XIAO Xufeng)
6a8aed12ee ci: partially enable ut tests for esp32c2
Disabled test cases are tracked in:

 IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131

- test_fatfs: IDF-5136

- test_pm: IDF-5053

- test_cache_mmu: IDF-5138

- test_partitions: IDF-5137

- test_vfs: IDF-5139

- test_freertos: IDF-5140

- test_wpa_supplicant: IDF-5046

- test_mbedtls: IDF-5141

- test_pthread: IDF-5142

- test_protocomm: IDF-5143

- test_lightsleep: IDF-5053

- test_taskwdt: IDF-5055

- test_tcp_transport: IDF-5144

- test_app_update: IDF-5145

- test_timer: IDF-5052

- test_spi: IDF-5146

- test_rtc_clk: IDF-5060

- test_heap: IDF-5167

ci: fixed issues for tests of libgcc, ets_timer, newlib

test_pm: support on C2
2022-06-02 14:23:35 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
Anton Maklakov
45f267390b espcoredump: fix unsigned arithmetic 2022-05-30 11:21:30 +07:00
Anton Maklakov
57785e5eca espcoredump: suppress -Waddress-of-packed-member warning 2022-05-30 11:21:30 +07:00
Fu Hanxi
b2f107b76c fix: espcoredump without project_description.json in ci 2022-05-25 12:00:13 +08:00
Aleksei Apaseev
e8cb6bd6b3 feat: Added extra gdbinit file loading for reproducible build 2022-05-13 08:41:24 +00:00
Alexey Lapshin
b5bafae596 tools: add GDB v11.1 as a tool
GDB now is standalone tool separated from toolchain due to frequent updates.

Added installation tests for the new tool.

Tests are changed because they were wrong, see explanation:
esp32 objdump:
    40084290 <esp_crosscore_int_send_yield>:
    ......
    /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
    4008429c:    000090            retw

With previous GDB backtrace was:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144

This commit fixes the backtrace with the right line number:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145

Other tests changes have the same cause of fixing.

Closes https://github.com/espressif/esp-idf/issues/6334
2022-04-25 11:21:48 +07:00
Ivan Grokhotkov
c70a69b1dd Merge branch 'bugfix/remove_ref_non_ex_options' into 'master'
config: removed references to non-existing kconfig options

See merge request espressif/esp-idf!17495
2022-03-25 18:02:54 +08:00
Aleksei Apaseev
528cdc1546 core_dump: split corefile and coredump script from idf into a separate package 2022-03-24 13:57:48 +08:00
Marius Vikhammer
0fbae992dd config: removed references to non-existing kconfig options 2022-03-15 18:32:22 +08:00
Sudeep Mohanty
a9fda54d39 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
Aditya Patwardhan
4582af75b8 mbedtls: Update licenses of files updated in mbedtls-3.1 update 2022-03-04 05:18:58 +00:00
Laukik Hase
3925365351 ci: Fix pre-check stage failing tests
- Updated license headers
- Re-enabled public headers and static analysis checks
- Fix public header file check failure

Co-authored-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
2022-03-03 01:37:10 +05:30
Aditya Patwardhan
45122533e0 mbedtls-3 update:
1) Fix build issue in mbedtls
2) skip the public headers check in IDF
3)Update Kconfig Macros
4)Remove deprecated config options
5) Update the sha API according to new nomenclature
6) Update mbedtls_rsa_init usage
7) Include mbedtls/build_info.h instead of mbedtls/config.h
8) Dont include check_config.h
9) Add additional error message in esp_blufi_api.h
2022-03-03 01:37:10 +05:30
Darian Leung
57fd78f5ba freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
2022-02-09 23:05:45 +08:00
Omar Chebib
a07b3acf9a Merge branch 'bugfix/coredump_data_section' into 'master'
espcoredump: fix a bug where tracked DRAM data were not dumped

Closes IDFGH-6498

See merge request espressif/esp-idf!16573
2022-01-11 07:43:25 +00:00
Fu Hanxi
4f779bb7c6 ci: use python -m coverage instead of coverage executable 2022-01-07 16:18:32 +08:00
Omar Chebib
51917cb49c espcoredump: add a test for coredump dumped sections 2022-01-06 16:53:41 +08:00
Omar Chebib
b0afae5e60 espcoredump: fix a bug where tracked DRAM data where not dumped
Variables marked as COREDUMP_DRAM_ATTR will now be part of the core dump.

* Closes https://github.com/espressif/esp-idf/issues/8151
2022-01-06 16:53:35 +08:00
Sudeep Mohanty
e22b4007d3 esp_hw_support: Removed deprecated CPU util functions
The following files were deleted:
- components/esp_hw_support/include/soc/cpu.h
- components/soc/esp32s3/include/soc/cpu.h

The following functions are deprecated:
- get_sp()

The following functions declared in soc/cpu.h are now moved to esp_cpu.h:
- esp_cpu_configure_region_protection()

The following functions declared in soc/cpu.h are now moved to components/xtensa/include/esp_cpu_utils.h:
- esp_cpu_process_stack_pc()

All files with soc/cpu.h inclusion are updated to include esp_cpu.h instead.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-28 16:58:37 +05:30
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Anton Maklakov
1d3a47e10a coredump: update test data for toolchain 2021r2 2021-10-20 22:00:39 +07:00
Anton Maklakov
c402b82c1a coredump: Add some notes on how to generate test data 2021-10-13 15:06:41 +07:00
Shubham Patil
8ad9daea7d espcoredump: Parse bt for instruction fetch prohibited cause 2021-09-29 23:08:54 +05:30
Ivan Grokhotkov
e21e5aac64 esp_hw_support: update esp32s3 chip ID to the MP version
- Update 7.2.5 chip ID (4) to 7.2.8 chip ID (9).
- Remove TODO in espcoredump regarding this mismatch.
2021-09-13 15:16:45 +02:00
dmitry
5d859f1404 Add Esp32s3 to the coredump component.
Add changed expected_output for esp32, esp32s2 and esp32c3. coredump tag update.
2021-09-13 05:20:34 -04:00
Omar Chebib
92cf321677 freertos: add kconfig options for task snapshot functions
Task snapshots is required by other modules that don't use gdbstub
or core dump. Add a Kconfig option to manage these possibilities.
2021-09-01 15:13:48 +08:00
Omar Chebib
83c9e1b223 freertos: take tasks snapshot out of tasks.c source code 2021-08-16 10:29:36 +08:00
Marius Vikhammer
8b259d15f6 coredump: fix section name parsing in python utility
elf.py assumed every section header name had its own string in
shstrtab, but multiple sections may reuse the same substring with
different offsets.
2021-08-02 13:15:30 +08:00
Shubham Patil
2d2b066c01 espcoredump: Update expected output to fix test failures 2021-07-28 09:41:07 +05:30
Shubham Patil
3e84e5e668 Merge branch 'bugfix/xtensa_extra_info_register_values' into 'master'
espcoredump.py: Parse EPS and EPC register values using register index

See merge request espressif/esp-idf!14448
2021-07-27 10:22:41 +00:00
Fu Hanxi
12f0b55ca9 test(coredump): refactor coredump test and add esp32s2/esp32c3 tests 2021-07-22 10:17:59 +08:00
Shubham Patil
df12f22e37 espcoredump.py: Parse EPS and EPC register values using register index 2021-07-21 20:24:47 +05:30
Omar Chebib
f810d51327 coredump: simplify the implementation of esp_core_dump_image_erase function
Closes https://github.com/espressif/esp-idf/pull/6949
2021-06-21 11:26:09 +08:00
0xFEEDC0DE64
352dc6cf83 Fixed esp_core_dump_image_erase() for flash encryption with 16byte long write buffer 2021-06-21 10:50:47 +08:00
Sachin Parekh
46dc36233a coredump: Parse backtrace info for RISCV
For RISCV, backtrace generation on device is not possible without
including and parsing DWARF sections. We extract the crash task stack
and let the host generate the backtrace
2021-05-17 11:43:25 +05:30
Fu Hanxi
b972631658 feat(coredump): add esp32s2 and esp32c3 support 2021-04-26 20:44:23 +08:00
Fu Hanxi
d94423c1cf fix(coredump): pr_status pid padding should be uint16 2021-04-26 20:44:23 +08:00
Omar Chebib
837629814f coredump: core dump data check can now be parametrized
Core dump integrity check can now be parametrized through menuconfig.
It can be performed on boot or ignored. When core dump is activated
in the menuconfig, the user can still check the core dump at any time
with the function `esp_core_dump_image_check()`.

Fix a bug where `esp_core_dump_image_get()` was not accessible
when core dump was disabled.

Closes https://github.com/espressif/esp-idf/issues/6620
2021-04-19 13:05:32 +08:00
Shubham Patil
78e387c2bc espcoredump: Fix string truncation build failure 2021-04-14 14:42:09 +05:30
Michael (XIAO Xufeng)
8cfcf6da7a Merge branch 'bugfix/enable_gpio18_gpio19_esp32c3' into 'master'
gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3

Closes IDF-2964

See merge request espressif/esp-idf!12753
2021-04-12 09:39:55 +00:00
Shubham Patil
356e2bbe6d espcoredump: On device core dump parsing to generate summary 2021-04-09 09:43:40 +05:30
Omar Chebib
cd79f3907d gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3
When `DIS_USB_JTAG` eFuse is NOT burned (`False`), it is not possible
to set pins 18 and 19 as GPIOs. This commit solves this by manually
disabling USB JTAG when using pins 18 or 19.
The functions shall use `gpio_hal_iomux_func_sel` instead of
`PIN_FUNC_SELELECT`.
2021-04-08 14:01:18 +08:00
0xFEEDC0DE64
45de6f9c59 espcoredump erase review comments 2021-03-30 08:59:39 +00:00
0xFEEDC0DE64
a72f2e2257 coredump: Implemented esp_core_dump_image_erase() and esp_core_dump_image_get() now returns ESP_ERR_NOT_FOUND when partition is blank
Closes https://github.com/espressif/esp-idf/pull/6631
2021-03-30 08:59:39 +00:00
Omar Chebib
e533431095 espcoredump: Fix bugs related to (fake) stacks
Add support to tasks stacks in RTC DRAM. Before this fix, any stack
in RTC DRAM would have been considered as corrupted, whichi is not
the case.
Fix a bug related to wrong parameters passed to esp_core_dump_get_stack.
Fix a bug reading fake stack memory, triggering a memory violation.

* Closes https://github.com/espressif/esp-idf/issues/6751
* Merges https://github.com/espressif/esp-idf/pull/6750
2021-03-22 11:38:21 +08:00
Angus Gratton
fd164b82b6 Merge branch 'refactor/move_from_xtensa' into 'master'
Movements from xtensa

Closes IDF-2164

See merge request espressif/esp-idf!10556
2021-03-11 00:24:25 +00:00
Renz Bagaporo
10c5226095 ldgen: use uppercase keywords for flags 2021-03-01 14:19:34 +08:00
Renz Bagaporo
dbdc17cced ldgen: rename emit to surround 2021-03-01 14:19:34 +08:00
Renz Bagaporo
115b6ac0ac esp32: transfer coredump linker script blocks to ldgen 2021-03-01 14:19:34 +08:00
Renz Bagaporo
633ead5dcb esp32: move coredump sections and schemes to espcoredump 2021-03-01 14:19:34 +08:00
Renz Bagaporo
0f03f450ff esp_hw_support: create esp_cpu
Create a esp_cpu header that contains CPU-related functions and
utilities.
2021-02-26 13:34:29 +08:00
Anton Maklakov
3a629afb06 Merge branch 'feature/type_checking_python' into 'master'
CI:Type checking of Python scripts

Closes IDF-2413

See merge request espressif/esp-idf!12287
2021-02-26 03:06:37 +00:00
Angus Gratton
b4612a2f14 Merge branch 'feature/coredump_refactor_riscv_support' into 'master'
espcoredump: code refactoring and add support for RISC-V implementation

Closes ESP-1758

See merge request espressif/esp-idf!11850
2021-02-25 22:41:27 +00:00
Tomas Sebestik
a22597a2d6 Add mypy check to pre-commit-config 2021-02-25 07:05:43 +00:00
0xFEEDC0DE64
5a956f8b5e Fixed c++ include usage for esp_core_dump.h 2021-02-20 22:27:45 +01:00
Omar Chebib
e9996ebd4b espcoredump: code refactoring and add support for RISC-V implemetation
This commit includes the refactoring of the core dump feature. Thanks to
this refactoring, it is easier to integrate the support of RISC-V
architecture for this feature.

Fixes ESP-1758
2021-02-07 19:04:19 +08:00
Fu Hanxi
da73dc8195 fix(coredump): parse registers values from stack 2021-01-29 11:12:21 +08:00
Ivan Grokhotkov
88252c98b8 Merge branch 'feature/refactor_espcoredump' into 'master'
Feature: Refactor espcoredump

See merge request espressif/esp-idf!11525
2021-01-21 20:35:31 +08:00
Angus Gratton
3532f52f60 Merge branch 'bugfix/ldgen_ignore_nonexistent_archives_and_obj' into 'master'
ldgen: check mappings

Closes IDF-1624

See merge request espressif/esp-idf!8557
2021-01-21 15:59:35 +08:00
Fu Hanxi
be71f5050d core dump: modify the test according to the refactor 2021-01-21 15:14:59 +08:00
Fu Hanxi
d50f021a8c core dump: rewrite espcoredump.py with corefile package 2021-01-21 15:14:59 +08:00
Fu Hanxi
7109cda149 core dump: Add corefile package for parse/build bin/elf core files
- elf.py: elf related structs

- gdb.py: gdb related functions

- loader.py: extract elf/bin from flash to elf format core file

- xtensa.py: xtensa arch target related structs and functions
2021-01-21 15:14:59 +08:00
Renz Bagaporo
8d52b0b5e1 ci: exempt upstream libmbedtls mapping for sha256 2021-01-19 11:17:18 +08:00
Alexey Gerenkov
3b0fa33c20 coredump: Adds compile time check for target support 2021-01-18 20:51:11 +03:00
Alexey Gerenkov
589a3d9336 coredump: Switches to RTOS snapshots walking API 2021-01-18 20:51:05 +03:00
Omar Chebib
f4ac8433c1 coredump: Core dump is encrypted if the partition itself is encrypted
Core dump can now be written in plain text if the partition itself is encrypted.
So it is important to modify the partition table if the user wants an encrypted
core dump partition as by default, it is not.
Added some functions in core_dump_port.c to abstract the checksum implementation
from core_dump_flash.c file.

Closes IDF-458
2020-12-01 16:58:45 +08:00
Omar Chebib
a56a0921aa espcoredump: fix plain coredump written on an encrypted flash
The coredump is now encrypted when saved on an encrypted flash.
The cache used for saving the file onto the flash is bigger,
making the proccess more efficient.

Relates to IDF-458
Closes https://github.com/espressif/esp-idf/issues/2932
2020-11-26 16:28:32 +08:00
Roland Dobai
2ecf66eba3 tools: Wait and dump the initial messages during gdbmi initialization 2020-11-18 19:08:16 +01:00
Roland Dobai
82ee1d4683 tools: Increase the internal GDB response delay for espcoredump CI tests 2020-11-18 18:56:30 +01:00
Roland Dobai
646f3fb801 tools: Fix non-existing key in espcoredump's GDMI payload 2020-11-18 18:56:30 +01:00
Angus Gratton
420aef1ffe Updates for riscv support
* Target components pull in xtensa component directly
* Use CPU HAL where applicable
* Remove unnecessary xtensa headers
* Compilation changes necessary to support non-xtensa gcc types (ie int32_t/uint32_t is no
  longer signed/unsigned int).

Changes come from internal branch commit a6723fc
2020-11-13 07:49:11 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
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