Commit Graph

426 Commits

Author SHA1 Message Date
Roland Dobai
ff84535758 esptool_py: Update to support ESP32-S3 USB OTG compressed flashing with stub 2022-04-14 12:28:28 +02:00
Omar Chebib
b868fd2a95 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-02-22 02:38:00 +00:00
KonstantinKondrashov
90c63f7250 esp_system: ipc_isr does not use its own initialization task, it is done from ipc_task()
It helps to reduce the memory usage at startup.

Closes https://github.com/espressif/esp-idf/issues/8111
2022-02-18 12:36:05 +08:00
Jiang Jiang Jian
e3a5a85e2f Merge branch 'feature/gcov_esp32c3_v4.4' into 'release/v4.4'
debug_stubs and gcov: Refactor and add support for RISCV (v4.4)

See merge request espressif/esp-idf!17068
2022-02-16 03:26:49 +00:00
Michael (XIAO Xufeng)
730ca0ea43 Merge branch 'bugfix/cpu_reset_perip_clk_disable_v4.4' into 'release/v4.4'
esp_system: change range comparsion for reset reason to specifc cpu reset reason comparison (backport v4.4)

See merge request espressif/esp-idf!15898
2022-02-10 10:32:09 +00:00
Alexey Gerenkov
1bbefc3e5d debug_stubs: Refactor and add support for RISCV 2022-02-08 22:24:54 +03:00
songruojing
b80a070395 esp_system: replace the range comparsion for reset reason in perip clk init with specific reset reason check, also add a test case in LEDC to check for the perip clk not being disabled after cpu reset
(cherry picked from commit f57456e9dd919e5eea1d3cd0caa64b5c97a4df73)
2022-01-27 09:51:00 +00:00
Martin Vychodil
7d9652dccf System/Security: Memprot API unified (ESP32C3,ESP32S3)
Unified Memory protection API for all PMS-aware chips

Closes JIRA IDF-3849
2022-01-27 12:40:27 +08:00
Roland Dobai
a59e3ab59d Merge branch 'feature/esp32s3_apptrace_v4.4' into 'release/v4.4'
Feature/esp32s3 apptrace v4.4

See merge request espressif/esp-idf!16649
2022-01-26 09:58:35 +00:00
KonstantinKondrashov
8f2045f0da esp_system: Fix RTC_WDT protection in esp_restart_noos
Fixed issue - v4.3 app not compatible with 3.1 bootloader
2022-01-10 21:57:29 +08:00
Alexey Gerenkov
8c2990fcea trax: Adds ESP32-S3 support 2022-01-05 19:34:28 +01:00
Martin Vychodil
60386410ae System: fix RTCFAST section alignment
This bugfix contains 3 fixes:
1. .rtc_dummy section is removed (not needed for C3)
2. .rtc_text section is padded with 16B for possible CPU prefetch
3. .rtc_text section is aligned to 4B boundary to comply with PMS Memprot requirements
2021-12-22 21:58:20 +01:00
Marius Vikhammer
d730c84038 ci: fix "can set sleep wake stub from stack in RTC RAM" test case failure
"can set sleep wake stub from stack in RTC RAM" would randomly fail on S3 due to stack overflow.

Fixed wrong usage of stack size and slightly increased it.
2021-12-09 13:59:30 +08:00
Erhan Kurubas
b748053e2e startup: init timer before calling esp_apptrace_tmo_init 2021-11-25 23:58:36 +01:00
Cao Sen Miao
fcecbde778 vfs_usb_serial: set secondary selection for making usb port can output under default menu 2021-11-17 19:54:15 +08:00
Ivan Grokhotkov
85bc2d7240 esp_timer: allow querying the timer before esp_timer_init is called 2021-11-15 19:38:09 +08:00
Darian Leung
7e725751e4 freertos: Remove critical nested macros
This commit removes the following critical nested macros as follows:

- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()

They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.

Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
2021-11-10 18:34:32 +08:00
Martin Vychodil
3f26866533 System/Security: wrong check of the Memprot feature in esp_restart()/panic_restart()
esp_restart()/panic_restart() never resets the Digital system (so far required only by the Memprot feature) as there's a typo in the corresponding #define:
it checks CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE instead of CONFIG_ESP_SYSTEM_MEMPROT_FEATURE.
Issue fixed.

IDF-4094
2021-10-29 15:02:17 +02:00
Ivan Grokhotkov
d47d413e25 esp_system: fix high level interrupt handler not linked for GNU Make
In 4972605, high-level interrupt handler hook was renamed from
ld_include_highint_hdl to ld_include_panic_highint_hdl. However the
change wasn't applied in GNU Make based build system. As a result,
the default interrupt handler was linked and features which depended
on the high-level interrupt didn't work.

Closes https://github.com/espressif/esp-idf/issues/7759
Closes https://github.com/espressif/esp-idf/issues/7447
2021-10-26 11:26:45 +02:00
Mahavir Jain
81e3eb45ca cpu_start: rename function to add core prefix for more clarity 2021-10-20 15:16:25 +05:30
Mahavir Jain
61820f5b30 cpu_start: let individual core clear its interrupt matrix
There was race condition where interrupt entries set by APP cpu core
could have been cleared during PRO cpu startup.

This was observed while setting up "cache access error" interrupt in
SMP mode for ESP32-S3.

This fix allows to NOT modify or clear any entries set by other core
(APP or PRO) and thus avoiding any race conditions during startup code.
2021-10-20 15:16:25 +05:30
Mahavir Jain
bdeaeb8d7f esp_system: enable "cache disable but cache accessed" interrupt for ESP32-S3 2021-10-20 15:16:25 +05:30
Li Shuai
e8188e5d8f ci: replacing old header with new SPDX header style 2021-10-20 11:36:23 +08:00
Li Shuai
7c7f3aa84e unit test: add sleep test case for esp32s3 2021-10-20 11:36:23 +08:00
Li Shuai
a939f7d34b light sleep: add software workaround for esp32s3 gpio reset issue 2021-10-20 11:36:22 +08:00
Li Shuai
881e1b0fd5 deep sleep: add deep sleep support for esp32s3 2021-10-20 11:36:20 +08:00
Li Shuai
9298db641e deep sleep: fix some rtc fast memory definition errors in esp32s3 2021-10-19 21:47:27 +08:00
Omar Chebib
8048677b4c Xtensa: Branch and jump intructions referencing a relative label have been replaced
As branches/jumps on Xtensa have a maximum range for the destination, it is
unsafe to refer to a label to another compilation unit in a branch/jump instruction.
The labels have been replaced by absolute addresses.
2021-10-19 12:21:12 +08:00
Darian Leung
b23de0f8a1 twdt: Fix timeout decimal literals to prevent uint32_t overflow
This commit fixes the decimal literals used in calculating task
watchdog timeouts to prevent them from causing a uint32_t oveflow.

Closes https://github.com/espressif/esp-idf/issues/6648
2021-10-15 16:07:27 +08:00
Chen Yu Dong
f0a96e586d pre-commit fix 2021-10-12 14:05:19 +08:00
alex.li
26d8b7ee17 Add HW external coexist api.
Simplify the external coex flow.

And replace gpio of driver interface with hal one.
2021-10-12 14:05:14 +08:00
Zim Kalinowski
6dc684d2fa Merge branch 'feature/github-7517' into 'master'
[system] fix compiler warning with silent panic option

Closes IDFGH-5812

See merge request espressif/esp-idf!15420
2021-10-11 08:56:57 +00:00
Zim Kalinowski
584806a78a updated copyright text 2021-10-11 11:38:35 +08:00
Zim Kalinowski
f2b538b9e7 Merge branch 'master' into feature/github-7517 2021-10-09 18:58:27 +08:00
Armando
2655a506c9 mspi: support auto detect octal flash vendor 2021-10-08 15:59:57 +08:00
Ivan Grokhotkov
8f0ee18931 Merge branch 'feature/clang_toolchain_compat' into 'master'
Build system: minimal changes for clang compatibility

See merge request espressif/esp-idf!15168
2021-09-23 08:19:09 +00:00
Bao Hong De
eccb1f85d8 Merge branch 'bugfix/btdm_link_error_of_kconfig' into 'master'
Bugfix/btdm link error of kconfig

See merge request espressif/esp-idf!15176
2021-09-17 06:26:37 +00:00
baohongde
b310c062cd components/bt: move config BT_RESERVE_DRAM from bluedroid to ESP32 controller 2021-09-16 20:26:35 +08:00
Ivan Grokhotkov
b5606f5e81 esp_system: make the abort operation compatible with clang
Clang warns that the original code wouldn't have any effect:

    warning: indirection of non-volatile null pointer will be deleted,
             not trap [-Wnull-dereference]
    note: consider using __builtin_trap() or qualifying pointer
          with 'volatile'

__builtin_trap translates to 'break 1, 15' instruction on Xtensa,
which might be okay in this case. However to absolutely certainly not
break anything for GCC builds, add 'volatile' instead.
2021-09-16 11:07:54 +02:00
Armando
c45c6f52f1 adc: support adc efuse-based calibration on esp32s3 2021-09-14 11:42:50 +08:00
David Čermák
9f957cbfe2 Merge branch 'bugfix/memprot_panic_print_const_correction' into 'master'
panic: Fix minor const string correction on meprot panic print

See merge request espressif/esp-idf!14851
2021-09-13 06:13:33 +00:00
Andrei Safronov
9159aa58d3 tests: refactoring of the gcc's inner functions, because clang doesn't support them 2021-09-10 19:51:27 +03:00
baohongde
006a10b050 components/doc: Update doc about high-level interrupt
some bugfix.
2021-09-09 20:40:09 +08:00
David Cermak
0ee4c235eb panic/memprot: Fix minor const string correction on panic print 2021-09-09 11:46:21 +02:00
baohongde
e2fb413329 components/bt: add config option to choose Bluetooth intterupt level. 2021-09-09 11:29:17 +08:00
baohongde
6d63fe06fa components/os: add config option to choose system check intterupt level. 2021-09-09 11:29:12 +08:00
baohongde
8a4696d25a components/os: Fix live lock int bt isr using ocd multicore debug
components/os: Fix live lock in bt isr immediately
2021-09-09 11:29:08 +08:00
baohongde
d1db2df316 components/bt: High level interrupt in bluetooth
components/os: Move ETS_T1_WDT_INUM, ETS_CACHEERR_INUM and ETS_DPORT_INUM to l5 interrupt

components/os: high level interrupt(5)

components/os: hli_api: meta queue: fix out of bounds access, check for overflow

components/os: hli: don't spill registers, instead save them to a separate region

Level 4 interrupt has a chance of preempting a window overflow or underflow exception.
Therefore it is not possible to use standard context save functions,
as the SP on entry to Level 4 interrupt may be invalid (e.g. in WindowUnderflow4).

Instead, mask window overflows and save the entire general purpose register file,
plus some of the special registers.
Then clear WindowStart, allowing the C handler to execute without spilling the old windows.
On exit from the interrupt handler, do everything in reverse.

components/bt: using high level interrupt in lc

components/os: Add DRAM_ATTR to avoid feature `Allow .bss segment placed in external memory`

components/bt: optimize code structure

components/os: Modify the BT assert process to adapt to coredump and HLI

components/os: Disable exception mode after saving special registers

To store some registers first, avoid stuck due to live lock after disabling exception mode

components/os: using dport instead of AHB in BT to fix live lock

components/bt: Fix hli queue send error

components/bt: Fix CI fail

# Conflicts:
#	components/bt/CMakeLists.txt
#	components/bt/component.mk
#	components/bt/controller/bt.c
#	components/bt/controller/lib
#	components/esp_common/src/int_wdt.c
#	components/esp_system/port/soc/esp32/dport_panic_highint_hdl.S
#	components/soc/esp32/include/soc/soc.h
2021-09-09 11:29:06 +08:00
Cao Sen Miao
6c0aebe279 esp_flash: add opi flash support in esp_flash chip driver, for MXIC 2021-09-07 14:44:40 +08:00
boarchuz
ec70bc0523 fix compiler warning with silent panic option 2021-09-04 14:46:26 +10:00