Commit Graph

181 Commits

Author SHA1 Message Date
Erhan Kurubas
6e5b4febf8 change(system): increase OCD stub memory reservation from 8K to 12K 2026-07-28 07:45:39 +03:00
Mahavir Jain
c566ace1f6 fix(esp_system): fixes build failure with XIP PSRAM + BSS/NoInit in external memory
Declare ext_ram_xip_seg as a distinct region overlapping drom_seg at the
same origin (the esp32s3/c5/c61/h4 pattern) instead of aliasing drom_seg,
so .ext_ram.dummy has its own location counter and .ext_ram.bss reclaims
the VMA space of NOLOAD rodata (.rodata_wlog_*), saving up to one MMU
page of PSRAM on esp32s31. No layout change on esp32p4.

Closes https://github.com/espressif/esp-idf/issues/18791
Related https://github.com/espressif/esp-idf/issues/14992
2026-07-22 16:39:25 +05:30
harshal.patil
6b417e9d47 fix(esp_common/esp_fault): make ESP_FAULT_ASSERT survive optimization
ESP_FAULT_ASSERT(C) was silently deleted by the optimizer when C is a cached
flag/status already proven by a preceding `if (!C) return/goto`: the compiler
folds C to a constant and drops all three checks, removing the fault-injection
protection with no warning.
2026-06-17 16:45:29 +05:30
Marius Vikhammer
f7344e0a46 refactor(panic): route panic handlers through esp_sys_event
Let panic-related components register their hooks through
esp_sys_event so panic sequencing stays extensible without
hardcoded esp_system dependencies.
2026-06-10 11:21:47 +08:00
Marius Vikhammer
be36c20503 feat(esp_system): add esp_sys_event framework
Introduce a shared esp system event framework and use it
for system init and shutdown.
2026-06-03 15:02:43 +08:00
Alexey Gerenkov
edb75262a1 Merge branch 'feature/update-esp-clang-to-esp-21.1.3_20260304' into 'master'
feat(tools): update esp-clang version to esp-21.1.3_20260408

Closes IDF-14965, LLVM-501, and LLVM-531

See merge request espressif/esp-idf!46361
2026-05-13 22:54:10 +08:00
Alexey Gerenkov
f16bb34ff7 fix(build): fix Clang 21 build warnings/errors 2026-05-07 17:42:38 +03:00
Marius Vikhammer
0ab385ab88 fix(ulp): correct target LP memory reservation limits
The configured maximum should match each target's fixed LP/RTC
reservations so menuconfig does not advertise values that the linker
cannot support.

Keep the linker failure explicit about CONFIG_ULP_COPROC_RESERVE_MEM
because application RTC sections still share the remaining LP/RTC RAM.
2026-05-06 17:37:35 +08:00
Marius Vikhammer
261bd160aa feat(ulp): support placing ULP app in HP-RAM 2026-04-29 09:47:33 +08:00
Marius Vikhammer
10637dbf5e feat(ulp): add support for ulp on esp32s31 2026-04-20 14:45:23 +08:00
Song Ruo Jing
8f0e59fadf Merge branch 'feature/esp32s31_clock_support' into 'master'
feat(clk): support for esp32s31 clock tree

Closes IDF-14696 and IDF-14871

See merge request espressif/esp-idf!47048
2026-04-03 11:04:42 +08:00
Armando (Dou Yiwen)
b533c6750e Merge branch 'feat/mmu_s31' into 'master'
mmu: s31 support for external mmu

Closes IDF-14669

See merge request espressif/esp-idf!47133
2026-04-03 02:42:20 +00:00
Roland Dobai
6c6b1b8ae3 Merge branch 'feat/adopt_fast_reflashing' into 'master'
feat(idf_py): idf.py flash will reflash only changed data sectors by default

Closes IDF-11871

See merge request espressif/esp-idf!45542
2026-04-02 19:37:27 +02:00
Song Ruo Jing
50051b74a5 feat(clk): support for esp32s31 clock tree 2026-04-02 20:39:59 +08:00
Radim Karniš
c62515671d change(build): Rename Fast reflashing configuration to Minimize binary changes, make non-experimental 2026-04-02 10:53:32 +02:00
Guillaume Souchere
1c2f7b435a feat(esp_system): Add linux support for freertos hooks and system init function 2026-04-01 11:46:06 +02:00
armando
2b582796d3 feat(mmu): s31 support 2026-04-01 11:49:22 +08:00
Alexey Gerenkov
c79d304c4d fix(build): Fixed constructors placement by Clang for Xtensa
By default Clang puts constructors into '.init_array'.
Close https://github.com/espressif/esp-idf/issues/17990
2026-03-23 19:15:14 +03:00
armando
c60ed4b338 fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-17 01:29:34 +00:00
armando
c96f69faef change(mem): deprecated tcm and added scp memory utils 2026-03-11 11:18:15 +08:00
Alexey Lapshin
526891e08f Merge branch 'feature/refactor_linker_scripts' into 'master'
feat(esp_system): refactor linker scripts to reduce duplicated code

See merge request espressif/esp-idf!45220
2026-02-02 13:09:30 +04:00
Alexey Lapshin
f28a2765d8 fix(esp_system): xtensa: refactor linker scripts and reduce binary size for C++ apps 2026-01-30 23:27:32 +07:00
Alexey Lapshin
9f1359ad08 feat(esp_system): riscv: refactor linker scripts to reduce duplicated code 2026-01-30 23:27:29 +07:00
Alexey Lapshin
c0fcd5cbcd fix(panic): fix _bss_end alignment for esp32s2 and esp32s3 2026-01-28 13:01:48 +07:00
Erhan Kurubas
14c16bee61 feat(coredump): add coredump_noinit attribute 2026-01-11 18:57:37 +03:00
Li Shuai
6e9885f7e6 Merge branch 'bugfix/idfgh-16634' into 'master'
remove the configurable constraint for sleep memory usage optimization option

Closes IDFGH-16634 and IDF-13780

See merge request espressif/esp-idf!42882
2025-12-31 12:57:50 +08:00
Li Shuai
cbbbc413b1 change(ld): adding a comment explaining the unsigned arithmetic constraint for GNU ld buildin function MAX. 2025-12-30 16:45:14 +08:00
Li Shuai
dba80336df fix(ld): fix cannot move location counter backwards (from 3fc88000 to 3fc87fff) 2025-12-30 11:47:49 +08:00
Marius Vikhammer
af174ff486 fix(system): removed the exe flag from psram memory for esp32
extern_ram_seg segment was marked as RWX in the linker script
even though we cannot run code from PSRAM on ESP32.

This is a link-time check, and actual CPU RWX permissions are
controlled seperately so this has no practical implications,
but it could mistakenly be remarked upon during security scans
or checks by customers.
2025-12-29 09:36:39 +08:00
wuzhenghui
019a019514 docs(esp_system): add detailed RTC memory layout documentation 2025-12-12 16:04:24 +08:00
wuzhenghui
4125fd68ac fix(esp_system): fix rom secure boot fast wake feature for c5/c6/h2/h21 2025-12-12 16:04:20 +08:00
Alexey Lapshin
31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
C.S.M
4becb6dbf6 feat(esp32s31): Add esp_system component support 2025-11-25 17:11:59 +08:00
Marius Vikhammer
257ee931cd Merge branch 'bugfix/p4_eco5_init_arrays' into 'master'
fix(system): fixed constructors not working properly on P4 ECO5

Closes IDF-14425

See merge request espressif/esp-idf!43547
2025-11-21 09:42:26 +08:00
Marius Vikhammer
641420c5e0 fix(system): fixed constructors not working properly on P4 ECO5 2025-11-20 17:37:48 +08:00
Marius Vikhammer
cd0e6ec2ca fix(lp-core): fixed rtc mem conflict on p4 eco5 between app and ULP 2025-11-20 17:03:23 +08:00
Roland Dobai
a295be6658 Merge branch 'feat/ldgen_fast_reflashing' into 'master'
feat(ldgen): initial support for fast reflashing

Closes IDF-14213

See merge request espressif/esp-idf!42780
2025-11-18 10:28:49 +01:00
C.S.M
961bd0cf78 Merge branch 'feat/introduce_esp32s31' into 'master'
feat(esp32s31): Introduce new target esp32s31

See merge request espressif/esp-idf!43316
2025-11-18 15:55:16 +08:00
C.S.M
a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
armando
b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
Frantisek Hrbata
2ade22ff85 feat(esp_system): add mutable markers to sections.ld.in templates
Entity mappings for immutable libraries are placed in the existing
`mapping[target]` marker, while those for mutable libraries are placed
in the new `mutable[target]` marker, which comes after the `mapping`
marker. Additionally, include padding after the input sections of
mutable libraries in the default data and text output sections,
providing a headroom for the mutable libraries to grow.  Padding is
currently not added, for example, in the `.iram0.data` output section,
which is not expected to change frequently. Padding for other mutable
input sections may be added in the future.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:36 +01:00
Laukik Hase
b9a503e9ec feat(esp_tee): Support for ESP32-C61 - the rest of the components 2025-11-07 14:54:16 +05:30
wuzhenghui
e9da2e3606 fix(esp_hw_support): add p4 rev3.0 MSPI workaround for deepsleep 2025-10-30 14:50:27 +08:00
Alexey Lapshin
d9389ba082 change(bootloader): rename bootloader.ld -> bootloader.ld.in
This change passes file through compiler preprocessor which unlocks
future code refactoring.
2025-09-24 00:51:54 +08:00
Konstantin Kondrashov
8e7ed24eb6 feat(log): Reserve first 4 bytes as zero for vars pointed to NULL
For bin log, reserve the first 4 bytes as zero for variables that are pointed to NULL
and should not be printed in the log. So the esp-idf-monitor will skip printing
those variables.
2025-09-15 15:40:45 +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
Alexey Lapshin
019dc93ae0 feat(esp_system): switch to standard __libc_init_array initialization
Initially, ESP-IDF used the do_global_ctors() function to run global
constructors. This was done to accommodate Xtensa targets that emit
.ctors.* sections, which are ordered in descending order.

For RISC-V, compilation used .init_array.* sections, which are designed
to have ascending order. Priority constructors in .init_array.* sections
were correctly processed in ascending order. However, non-priority
.init_array section was processed in descending order, as it was done
for Xtensa .ctors.

Starting with ESP-IDF v6.0, the implementation switched to the standard
LibC behavior (__libc_init_array()), which processes both priority and
non-priority constructors in ascending order.

To achieve this, a breaking changes were introduced:
  - Xtensa .ctors.* priority entries converted to .init_array.* format
    (ascending), to be passed to __libc_init_array().
  - Processing order of non-priority .init_array and .ctors sections was
    changed from descending to ascending.

Also, this change introduces .preinit_array for linking. This may be
needed for some C++ or sanitizer features.

Related to https://github.com/espressif/esp-idf/issues/15529
2025-08-04 11:33:44 +08:00
armando
9be8dccef5 feat(psram): psram support on h4 2025-07-28 10:16:48 +08:00
armando
bcf04e356b resolve comments, to squash 2025-07-10 06:24:32 +00:00