Commit Graph
234 Commits
Author SHA1 Message Date
Song Ruo Jing 4a94a5a396 fix(stdio): add console input ability when selects ESP_CONSOLE_UART_CUSTOM_NUM_1 2026-07-08 12:08:46 +08:00
Meet Patel d51e467e7c Merge branch 'feature/add_kasan_support' into 'master'
feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF

Closes IDF-13467

See merge request espressif/esp-idf!48106
2026-06-25 11:30:48 +05:30
Meet Patel 383e9adb82 feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF
Add KASAN support for detecting heap memory safety bugs (buffer
overflows, underflows, use-after-free) at runtime using compiler
instrumentation and shadow memory. Gated behind
CONFIG_IDF_EXPERIMENTAL_FEATURES, with touch points kept to esp_system
and heap so other components stay untouched.

- Core runtime (esp_system/kasan.c, esp_kasan.h): nibble-based shadow
  memory in DRAM, poison/unpoison, per-access validation, and __asan_*
  stubs; hot-path stubs in IRAM so they stay valid with the flash cache
  off. Shadow init runs before heap bring-up.
- Heap integration (heap/heap_kasan*.c): alloc/free hooks add redzones,
  a quarantine FIFO, and shadow updates.
- Panic handling: disable checks once at the panic handler entry so
  backtrace and stack dumps can read redzones without nested reports.
- Build system: -fsanitize=kernel-address for app code, with HAL, SoC,
  esp_rom, SPI flash, esp_hw_support, bootloader_support, FreeRTOS, and
  heap internals excluded from instrumentation.
- Test app (tools/test_apps/system/kasan_test): Unity tests for
  overflow, underflow, use-after-free, and all sized __asan_* stubs,
  with halt and no-halt configurations.
- Docs: document KASAN in the heap memory debugging guide (EN and CN).
2026-06-24 11:27:00 +05:30
Wu Zheng Hui a82f41e369 Merge branch 'feat/optimize_esp32s31_active_power' into 'master'
feat: optimize esp32s31 active power

Closes IDF-15502

See merge request espressif/esp-idf!48833
2026-06-12 11:16:47 +08:00
wuzhenghui 322e4c265a feat(soc): disable esp32s31 WFE feature at startup 2026-06-10 21:20:04 +08:00
Angus Gratton 443f1bb791 esp_psram: Downgrade "not found" to a warning if "ignore not found" set.
This avoids ~5 errors being logged during boot if the board
has no PSRAM but is configured to boot anyway.

Closes https://github.com/espressif/esp-idf/pull/18705

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-06-10 15:15:47 +08:00
Renz Bagaporo 335fd1c24f fix(esp_system): configure ESP32-H4 ICACHE1_USAGE in app startup
Configure the ESP32-H4 ICACHE1_USAGE SRAM ownership bit during app startup
instead of relying on the value left by the bootloader.

Clear ICACHE1_USAGE before external memory/cache setup so single-core apps can
reclaim the ICACHE1 SRAM region as RAM. For multicore apps, set the bit again
when applying multicore cache settings so the region is assigned back to
ICACHE1.

This keeps the app behavior aligned with its own single-core or multicore
configuration even when bootloader and app configs differ.
2026-05-22 12:57:33 +09:00
wuzhenghui f1f3f204fe feat(esp_hw_support): support esp32s31 lightsleep/deepsleep example 2026-05-06 20:15:01 +08:00
Marius Vikhammer 8ea6a8ef9c feat(esp32s31): add bootloader support 2026-04-28 13:59:33 +08:00
Samuel Obuch 878e041e03 feat(esp_system): stop other core for unicore esp32s31 2026-04-23 08:37:44 +02:00
Wu Zheng Hui 1dbf5247d1 Merge branch 'feat/support_gpio_source_for_more_chips' into 'master'
feat(esp_hw_support): support GPIO wakeup deepsleep on esp32/esp32s2/esp32s3

Closes PM-666

See merge request espressif/esp-idf!45773
2026-03-26 11:28:45 +08:00
wuzhenghui 708f3ec52d change(esp_hw_support): move esp_deep_sleep_wakeup_io_reset to sleep_gpio.c 2026-03-25 10:49:47 +08:00
Meet Patel c4e2fe2c8b refactor(system): guard WDT with SoC capability macros
Wrap MWDT-related code under SOC_WDT_SUPPORTED so targets without a main
watchdog can compile.

Add SOC_RTC_WDT_SUPPORTED for RTC watchdog usage (bootloader, slow-clock
paths) and regenerate Kconfig.soc_caps.in. Bootloader RWDT setup stays
under SOC_RTC_WDT_SUPPORTED; MWDT flashboot teardown stays under
SOC_WDT_SUPPORTED.

ESP_INT_WDT, ESP_TASK_WDT_EN, and BOOTLOADER_WDT_ENABLE depend on
SOC_WDT_SUPPORTED where applicable. Build xt_wdt.c only when
SOC_XT_WDT_SUPPORTED. Provide no-op panic WDT helpers when
SOC_WDT_SUPPORTED is disabled.
2026-03-24 14:57:43 +05:30
Song Ruo Jing 526bf6176e Merge branch 'feature/esp32c61_flash_psram_timing_tuning' into 'master'
feat(mspi): support 120MHz flash and psram for esp32c61

Closes IDF-9256, IDF-14918, and IDFCI-3240

See merge request espressif/esp-idf!45012
2026-01-22 16:36:25 +08:00
Song Ruo Jing fc4f07abd6 feat(mspi): support 120MHz flash and psram for esp32c61 2026-01-21 14:38:04 +08:00
Xiao Xufeng e644aed729 fix(esp32p4): fix efuse, encryption and other rev_min usage 2026-01-19 16:58:16 +08:00
Xiao Xufeng bbafc3375a refactor(startup): make flash_init_state static 2026-01-07 17:41:36 +08:00
Mattias Schäffersmann eda4c247d0 fix(hw_support): Fix crash when reconfiguring flash from 40 to 80 MHz
Reading from the flash while it is being reconfigured leads to data
corruption and a crash when the reconfiguration code is located in flash.
This is only an issue if a device has a bootloader that runs with 40 MHz
flash and an application flashed via OTA that runs with 80 MHz flash.
If bootloader and application run with the same flash speed, the
reconfiguration is basically a no-op and no data corruption occurs.
Fix reconfiguration by placing the code back into IRAM.

Issue introduced in: 7549d08

Closes: https://github.com/espressif/esp-idf/pull/17905
2026-01-07 17:41:36 +08:00
Samuel Obuch 14fcae7082 fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore 2025-12-15 12:51:37 +01:00
Alexey Lapshin 31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
Armando (Dou Yiwen) 8f1e7bc4e0 Merge branch 'feat/cache_mem_iram_h4' into 'master'
cache: use icache memroy as diram when single core

See merge request espressif/esp-idf!43352
2025-11-14 18:06:00 +00:00
armando a28d9869c1 feat(cache): use icache memroy as diram when single core 2025-11-14 10:35:39 +08:00
wuzhenghui 83d91a153d feat(esp_hw_support): support unicore auto clock gating for esp32p4 rev3+ 2025-11-13 14:30:55 +08:00
Song Ruo Jing 4fb40fa91a fix(console): wrong uart console pin info when UART console is not used 2025-10-23 16:24:11 +08:00
Samuel Obuch 38498e67cf feat(esp_system): stop other core for unicore esp32h4 2025-09-27 01:41:48 +08:00
armando 8ebce9b805 change(cache): no use sdkconfig in cache/mmu hal 2025-09-22 01:01:03 +00:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
armando 179d00a6f8 feat(p4): p4 rev3 real chip support 2025-08-28 17:56:16 +08:00
Laukik Hase 340de9823a feat(esp_tee): Support for ESP32-C5 - the rest of the components 2025-08-13 14:08:59 +05:30
harshal.patil 60ff4bca9b refactor(esp_system): Update all references of the memory protection configs 2025-08-04 11:43:01 +05:30
Song Ruo Jing 0787da6eea fix(console): release default console UART pins if console is switched in bootloader
Also print out console UART pin number in app cpu_startup stage

Closes https://github.com/espressif/esp-idf/issues/16764
2025-07-29 21:59:10 +08:00
Armando (Dou Yiwen) c5a7513cb8 Merge branch 'feat/p4_eco5_fpga' into 'master'
esp32p4: eco5 support on FPGA

See merge request espressif/esp-idf!39917
2025-07-11 01:27:22 +00:00
armando bcf04e356b resolve comments, to squash 2025-07-10 06:24:32 +00:00
armando dfb0662de2 feat(esp32p4): support eco5 on fpga 2025-07-10 06:24:32 +00:00
morris c4d7b1cfce refactor(uart)!: deprcated esp_rom_uart.h 2025-07-08 18:56:17 +08:00
Alexey Lapshin 86ca6ef829 fix(build): fix -Wanalyzer-undefined-behavior-ptrdiff warnings 2025-06-25 18:00:39 +07:00
Konstantin Kondrashov ff0408c087 feat(esp_system): Adds Kconfigs to place code in IRAM 2025-06-23 13:23:33 +03:00
Michael (XIAO Xufeng) 957a232259 Merge branch 'feat/call_start_in_flash' into 'master'
esp_system: move call_start_cpu* into flash to save IRAM

See merge request espressif/esp-idf!39094
2025-06-17 14:57:27 +08:00
Michael (XIAO Xufeng) 7549d083a4 feat(hw_support): move call_start_cpu0 into flash to save IRAM 2025-06-16 15:07:34 +08:00
Song Ruo Jing 6d293c8582 feat(clk): Add basic clock support for esp32h21 2025-06-16 15:05:32 +08:00
Marius Vikhammer eb76e6341d Merge branch 'feature/h4_core_support' into 'master'
feat(core): bringup dual-core for H4

Closes IDF-12317, IDF-12319, IDF-12484, IDF-12311, and IDF-12293

See merge request espressif/esp-idf!39279
2025-05-28 14:42:58 +08:00
wuzhenghui 113f40a3e0 feat(esp_hw_support): support gate PLL div clock source by reference count 2025-05-27 19:55:23 +08:00
Marius Vikhammer e527554144 feat(core): bringup dual-core for H4 2025-05-26 17:11:12 +02:00
harshal.patil 46225a4026 feat(esp_psram): Add a new API to just detect and enable the PSRAM
- esp_psram_chip_init() just detects and does basic initialisations of PSRAM
- esp_psram_init() initialises and maps/loads the PSRAM pages
2025-04-29 11:48:27 +05:30
armando ac8cfadab0 refactor(psram): cleanup psram component code structure 2025-03-20 15:17:01 +08:00
morris b622aa382f Merge branch 'feat/h4_introduce_step6_esp_system' into 'master'
feat(esp32h4): support esp_system, esp_timer and freertos (stage6)

Closes IDF-12565

See merge request espressif/esp-idf!37269
2025-03-12 14:10:23 +08:00
Chen Jichang 69d2e7facb refactor(cpu): move some chip-specific operations to the ll 2025-03-11 16:48:21 +08:00
Chen Jichang 8e8c0573b4 feat(esp32h4): support esp_system, esp_timer and freertos (stage6) 2025-03-11 16:48:21 +08:00
Ondrej Kosta ae10c1333d fix(esp_system): removed L2MEM buffer enable for P4 2025-03-11 14:53:29 +08:00
morris 2cd87223a8 feat(l2mem): enable buffer mode for ahb burst access 2025-03-03 14:38:24 +08:00