build: (Custom) App version info is now on a dedicated section, independent of the rodata alignment

It is now possible to have any alignment restriction on rodata in the user
applicaiton. It will not affect the first section which must be aligned
on a 16-byte bound.

Closes https://github.com/espressif/esp-idf/issues/6719
This commit is contained in:
Omar Chebib
2021-03-18 12:01:04 +08:00
parent 9d649505bc
commit dd849ffc26
13 changed files with 182 additions and 4 deletions

View File

@@ -107,3 +107,12 @@ REGION_ALIAS("rtc_data_location", rtc_iram_seg );
#else
REGION_ALIAS("default_rodata_seg", dram0_0_seg);
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
/**
* If rodata default segment is placed in `drom0_0_seg`, then flash's first rodata section must
* also be first in the segment.
*/
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
ASSERT(_flash_rodata_dummy_start == ORIGIN(default_rodata_seg),
".flash_rodata_dummy section must be placed at the beginning of the rodata segment.")
#endif