Commit Graph

1927 Commits

Author SHA1 Message Date
Zim Kalinowski
05ed8331bc Merge branch 'feature/twdt_prints_backtrace_v4.1' into 'release/v4.1'
Add Task Watchdog backtrace printing (v4.1)

See merge request espressif/esp-idf!12617
2021-08-10 02:42:43 +00:00
Zim Kalinowski
80727f739a Merge branch 'bugfix/prefetch_invalid_v4.1' into 'release/v4.1'
soc: add dummy bytes to ensure instr prefetch always valid (v4.1)

See merge request espressif/esp-idf!12995
2021-08-09 21:18:21 +00:00
Darian Leung
57d8934707 Add Task Watchdog backtrace printing
This commit makes the Task Watchdog print the backtrace of both
cores when it times out.
2021-08-06 13:37:53 +08:00
chenjianqiang
59a07d40ad psram: support for esp32-pico-v3-02
1. Support for 16Mbit PSRAM
2. Support for esp32-pico-v3-02
3. Use package identifier to look up SPI flash/PSRAM WP Pin, unless overridden
2021-07-22 18:19:23 +08:00
Marius Vikhammer
0dfe45249a soc: add dummy bytes to ensure instr prefetch always valid
The CPU might prefetch instructions, which means it in some cases
will try to fetch instruction located after the last instruction in
flash.text.

Add dummy bytes to ensure fetching these wont result in an error,
 e.g. MMU exceptions
2021-07-12 09:18:15 +08:00
Angus Gratton
8d1a99e026 paritition_table: Verify the partition table md5sum when loading the app
Additionally, always enable the partition MD5 check if flash encryption is on in
Release mode. This ensures the partition table ciphertext has not been modified
(CVE-2021-27926).

The exception is pre-V3.1 ESP-IDF bootloaders and partition tables, which
don't have support for the MD5 entry.
2021-06-02 16:31:19 +10:00
Angus Gratton
a395f3592b Merge branch 'bugfix/dport_init_min_stack_size_v4.1' into 'release/v4.1'
freertos: Increase minimum task stack size when stack smashing checker is enabled (v4.1)

See merge request espressif/esp-idf!12800
2021-03-29 06:26:36 +00:00
Jiang Jiang Jian
056890a41a Merge branch 'bugfix/fix_some_wifi_bugs_0105_v4.1' into 'release/v4.1'
Bugfix/fix some wifi bugs 0105 v4.1 (backport v4.1)

See merge request espressif/esp-idf!11881
2021-03-23 16:36:07 +00:00
Jiang Jiang Jian
2750bb8e16 Merge branch 'bugfix/rtc_clk_cal_cycles_add_default_vals_for_all_sources_v4.1' into 'release/v4.1'
esp32xx: Fix default values for all RTC sources in RTC_CLK_CAL_CYCLES option (v4.1)

See merge request espressif/esp-idf!11413
2021-03-23 03:08:38 +00:00
Angus Gratton
280baea4f7 freertos: Increase minimum task stack size when stack smashing checker is enabled
Fixes issue with DPORT init task, this task uses minimum stack size and may not be
enough if stack smashing detection is set to Overall mode.

Also reworks the way we calculate minimum stack to allow for adding multiple
contributing factors.

Closes https://github.com/espressif/esp-idf/issues/6403
2021-03-19 13:22:10 +08:00
xiehang
37ce175bb5 esp_wifi: ESP32 phy add [sections:phy_iram] 2021-03-17 15:27:39 +08:00
Michael (XIAO Xufeng)
f6da7f3305 spi_flash: add config option to override flash size in bootloader header
Sometimes the flash size read from bootloader is not correct. This may
forbid SPI Flash driver from reading the the area larger than the size
in bootloader header.

When the new config option is enabled, the latest configured
ESPTOOLPY_FLAHSIZE in the app header will be used to override the value
read from bootloader header.
2021-02-23 01:23:53 +08:00
Angus Gratton
5b3734a04a efuse: Add ESP32 V3 'disable Download Mode' functionality 2020-12-16 17:08:04 +11:00
KonstantinKondrashov
3dddf0c81d esp32xx: Fix default values for all RTC sources in RTC_CLK_CAL_CYCLES option
Closes: https://github.com/espressif/esp-idf/issues/6037
2020-11-30 23:33:48 +08:00
Jiang Jiang Jian
d09d5479a8 Merge branch 'feature/light_sleep_reject_v4.1' into 'release/v4.1'
sleep: enable sleep reject when entering light sleep (backport v4.1)

See merge request espressif/esp-idf!9500
2020-11-22 20:48:39 +08:00
KonstantinKondrashov
d925b564cd esp32: Switch SPIRAM stack in esp_restart_noos() to internal stack
If esp_restart_noos() is run and the stack address points to external memory (SPIRAM)
then Cache_Read_Disable() raises up the error "Cache disabled but cached memory region accessed"
to fix this we switch stack to internal RAM before disable cache.

Added unit tests.

Closes: https://github.com/espressif/esp-idf/issues/5107
2020-11-21 07:14:38 +00:00
Angus Gratton
f1d98671d2 doc: Specify that sleep wakeup source restrictions apply to all current ESP32 revisions
Closes https://github.com/espressif/esp-idf/issues/4681

Discussion https://esp32.com/viewtopic.php?f=13&t=15145
2020-11-11 17:34:42 +11:00
Michael (XIAO Xufeng)
534b8a7940 spiram: fix the read id failure
The issue is caused by:
1. The disable_qio_mode inside read_id may have side effects.
2. read_id twice may have side effects.

Fix this issue by moving disable_qio_mode out of read_id and only do it
once before read_id. And retry read_id only when the first one is
failed.

Issue introduced in 3ecbb59c15.
2020-11-05 04:13:39 +00:00
chenjianqiang
cbf4d51ddb psram: fix 16mbit psram id read error 2020-11-05 04:13:39 +00:00
houwenxiang
eda943b7c5 driver(uart): fix uart module reset issue (release/v4.1)
On ESP32, due to fifo reset issue, UART2 will work incorrectly if reset the fifo of UART1(TX fifo and RX fifo). The software can workaround the RX fifo reset issue,

  while the TX fifo reset issue can not. When UART2 is used and UART1 is used as the log output port, a software reset can reproduce this issue. So we should reset the UART memory

  before the software reset to solve this problem.
2020-11-04 18:41:43 +08:00
Armando
961af7f903 spi: fix issue with closing DMA before CPU reset 2020-10-16 06:39:01 +00:00
Sachin Parekh
63c006ac91 gdb: Modify PC in case of invalid PC
Incase the PC is invalid, GDB will fail to translate addresses to
function names. To fix this, replace the invalid PC with a placeholder
address
2020-10-08 11:13:17 +05:30
Ivan Grokhotkov
8a849b29f2 Merge branch 'bugfix/panic_instr_fetch_prohibited_v4.1' into 'release/v4.1'
panic: skip over the first invalid PC in case of InstrFetchProhibited (v4.1)

See merge request espressif/esp-idf!10294
2020-09-23 17:00:16 +08:00
Jakob Hasse
89523af91f toolchain: C++ exception workaround
* disable C++ exception FDE sorting (saves RAM)

Closes IDF-1128
2020-09-17 10:51:39 +07:00
Ivan Grokhotkov
97b1f0f60c Merge branch 'init_priority_fix_v4.1' into 'release/v4.1'
CXX: make __attribute__((init_priority(n))) work (v4.1)

See merge request espressif/esp-idf!8444
2020-09-10 16:10:10 +08:00
Ivan Grokhotkov
3a96d07e11 panic: skip over the first invalid PC in case of InstrFetchProhibited
InstrFetchProhibited usually occurs because of a jump to an invalid
pointer. In this case, PC in the exception frame is the address of
the jump destination. 'esp_ptr_executable' check in print_backtrace
function recognizes the first frame as invalid, and the backtrace is
interrupted. This prevents the user from finding the location where
the invalid pointer is dereferenced.

Bypass the 'esp_ptr_executable' check if the exception cause is
InstrFetchProhibited. Update the test case to no longer ignore this
issue.
2020-09-04 20:56:03 +02:00
Ivan Grokhotkov
0dea1b38cb sleep: enable sleep reject when entering light sleep 2020-08-31 08:58:51 +00:00
Li Shuai
b89a2bb266 add soft solution for esp32 eco3 live lock issue 2020-08-07 06:42:35 +00:00
Jakob Hasse
5e536a3f43 CXX: make __attribute__((init_priority(n))) work
* Added corresponding test case
* Moved all C++ init tests to separate file

Closes https://github.com/espressif/esp-idf/issues/5038
2020-07-30 15:40:33 +08:00
KonstantinKondrashov
0a1919abff esp32: Reduce using ESP_EARLY_LOGx and move some code after the stdout initialization
After setting _GLOBAL_REENT, ESP_LOGIx can be used instead of ESP_EARLY_LOGx.

Closes: https://github.com/espressif/esp-idf/issues/5343
2020-06-17 15:53:45 +08:00
Ivan Grokhotkov
1e12199832 esp32: use ccomp_timer in SHA test 2020-06-02 13:15:14 +07:00
Jeroen Domburg
4eec4fbc99 Add fixes for gcc8 psram fix improvement 2020-06-02 13:14:29 +07:00
KonstantinKondrashov
a2a89fb95d esp32: Add a Kconfig option- Number of attempts to repeat 32k XTAL calibration
Closes: IDF-1479
2020-04-15 16:34:57 +08:00
chenjianqiang
90a8945930 psram: support psram 2T mode to fix single bit error
1. add enable PSRAM 2T mode function
2. abort when himem and 2T mode are enabled meanwhile
3. set SPIRAM_2T_MODE as "n" by default, enable it when needed
2020-04-13 14:26:45 +08:00
KonstantinKondrashov
12353ff3d8 esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-02-06 14:43:40 +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
Angus Gratton
459b3195ac esp_wifi: Move esp32 DPORT access wrappers into esp_wifi component 2020-01-08 18:23:29 +11:00
Angus Gratton
65dad0d46f build system: Remove some dependencies from esp32 & esp32s2beta
Possible now that wifi related source files are all in esp_wifi
2020-01-08 18:13:12 +11:00
Angus Gratton
f616d2f2de esp_wifi: Move wifi OS adapter structures into esp_wifi component 2020-01-08 18:13:12 +11:00
Ivan Grokhotkov
43de2cc84c test: add a (non-automated) case for backtraces with ROM functions 2020-01-02 18:50:32 +01:00
Ivan Grokhotkov
f52952cb45 esp32: panic: do digital reset if cache error interrupt is set
Even if frame->exccause != PANIC_RSN_CACHEERR, it is possible that
the cache error interrupt status is set. For example, this may happen
due to an invalid cache access in the panic handler itself.
Check cache error interrupt status instead of frame->exccause to
decide whether to do CPU reset or digital reset.

Also remove unnecessary esp_dport_access_int_pause from
esp_cache_err_get_cpuid, since the panic handler already calls
esp_dport_access_int_abort on entry.
2019-12-30 09:49:07 +01:00
liu zhifu
e1eeef2276 esp_wifi: fix a WiFi receiving bug
Support WiFi/BT MAC register writting when the WiFi/BT common clock is disabled.
2019-12-24 21:32:03 +08:00
Ivan Grokhotkov
f687cedebe Merge branch 'bugfix/wa_dport_and_intr' into 'master'
esp32: Fix for DPORT

See merge request espressif/esp-idf!7070
2019-12-24 01:30:56 +08:00
michael
3d1ec3f451 intr_alloc: fix the issue intr_enable/disable cannot be used in ISR in
esp32s2beta.

This issue is reported in config freertos_compliance_s2.
2019-12-23 10:23:00 +08:00
KonstantinKondrashov
9432ebddf9 esp32: Add UT for DPORT 2019-12-21 14:10:38 +00:00
KonstantinKondrashov
c4dcf6f917 esp32: Fix esp_dport_access_reg_read 2019-12-21 14:10:38 +00:00
Ivan Grokhotkov
2b6c85e182 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2019-12-18 10:11:24 +01:00
Angus Gratton
f7b51c164d Merge branch 'bufgix/esp_timer_set_alarm' into 'master'
esp_timer: Fix set_alarm. Case when timestamp < now_time

Closes WIFI-1511

See merge request espressif/esp-idf!6960
2019-12-16 13:39:44 +08:00
KonstantinKondrashov
ada09f8fad esp_timer: Add Test case when set_alarm needs set timer < now_time 2019-12-13 13:51:47 +08:00
KonstantinKondrashov
e6223440b3 esp_timer: Fix set_alarm. Case when timestamp < now_time
arg1 = MAX(int64_t arg1, uint64_t arg2) gave the wrong result, if arg1 < 0, it was presented as a larger value.
And ALARM_REG = (uin32_t)arg1. This leads to an infinite loop.
Fixed: both args are int64_t.

Closes: WIFI-1511
2019-12-12 14:02:26 +08:00