Commit Graph

13 Commits

Author SHA1 Message Date
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
Chen Jichang
8670800827 refactor(esp32h4): refactor memory.ld and section.ld 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
Chen Jichang
6f83f39dce feat(esp32h4): introduce target esp32h4(stage 1) 2025-02-08 17:07:44 +08:00
laokaiyao
b16ed57b2e esp32h4: removed esp32h4 related files 2023-04-23 12:03:07 +00:00
KonstantinKondrashov
efbafb873b bootloader_support: Adds API to detect Factory reset has happened
Closes https://github.com/espressif/esp-idf/issues/10753
2023-03-22 02:21:54 +08:00
Marius Vikhammer
585f05596b system: fixed USE_FIXED_STATIC_RAM_SIZE option
The USE_FIXED_STATIC_RAM_SIZE was not actually causing the heap to start
at a fixed address.

Closes https://github.com/espressif/esp-idf/issues/10270
Closes https://github.com/espressif/esp-idf/issues/10271
2023-03-16 16:23:59 +08:00
Armando
4c878eeb0a sections_ld: add description to .flash.rodata_noload
This commit also move _rodata_reserved_end symbol right at the entry of
the .flash.rodata_noload.
2023-02-07 20:23:52 +08:00
Armando
d6844051fc esp_mm: new virtual memory mapping apis via mmu 2023-02-07 20:23:52 +08:00
wuzhenghui
44df5b31af feature: add ram loadable app support 2023-02-01 17:57:22 +08:00
jiangguangming
a367ab4b76 ld: fix rtc.data rtc.bss section issues
1. rtc.data section: should include sbss srodata in rtc_wake_stub*.*
2. rtc.bss section: move rtc .bss .bss.* from rtc.data to rtc.bss
2023-01-10 17:03:54 +08:00
laokaiyao
8677216576 esp32h2: renaming esp32h2 to esp32h4 2022-11-08 17:05:33 +08:00