esp_system: component init functions macro

Allows components to declare initialization function, such that the
startup code does not have direct dependency on the component.
This commit is contained in:
Renz Christian Bagaporo
2020-02-05 19:57:40 +08:00
committed by Angus Gratton
parent bb5535ca5d
commit 0f43a2620d
4 changed files with 64 additions and 0 deletions
+6
View File
@@ -208,6 +208,10 @@ SECTIONS
_coredump_dram_end = ABSOLUTE(.);
/* should be placed after coredump mapping */
_esp_system_init_fn_array_start = ABSOLUTE(.);
KEEP (*(SORT(.esp_system_init_fn) SORT(.esp_system_init_fn.*)))
_esp_system_init_fn_array_end = ABSOLUTE(.);
mapping[dram0_data]
_data_end = ABSOLUTE(.);
@@ -278,6 +282,7 @@ SECTIONS
mapping[flash_rodata]
*(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
*(.gnu.linkonce.r.*)
*(.rodata1)
@@ -297,6 +302,7 @@ SECTIONS
__init_array_start = ABSOLUTE(.);
KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .ctors SORT(.ctors.*)))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))