esp-idf/components/bootloader/subproject/main
Ivan Grokhotkov 6e6b9ec5a6
bootloader, esp_system: increase static allocation space for esp32s3
The previously used splits between memory allocated for ROM code,
2nd stage bootloader and the app were somewhat safe and conservative.
This resulted in some space being unavailable for static allocation
in the app.

This commit increases the space available for static allocation to the
maximum possible amount.

1. Some of the ROM code static allocation is only used in UART/USB/SPI
   download modes. This region ("shared buffers") has been placed at
   the lower end of ROM memory area, to be reusable in flash boot
   mode. The 2nd stage bootloader linker script is modified to "pack"
   all sections exactly up to the end but with roughly 8K margin between
   startup stacks.
2. Instead of calculating the sections placement and hardcoding the
   addresses in the LD script again, rewrite it to calculate the
   start address of each memory region automatically based on the
   logic above.
3. Adjust the app memory layout (SRAM_IRAM_END) accordingly,
   increasing the space available for static allocation.

Overall these changes increase the space available for static
allocation by about 78kB.

The downside of these changes is that the 2nd stage bootloader .data
segment is now directly adjacent to the startup stack on the PRO CPU.
Previously, there was effectively about 78kB of extra stack space for
the PRO CPU, before the stack would run into the data segment.
2022-06-27 09:22:01 +05:30
..
ld bootloader, esp_system: increase static allocation space for esp32s3 2022-06-27 09:22:01 +05:30
bootloader_hooks.h bootloader: override the 2nd stage bootloader 2021-07-05 10:25:32 +08:00
bootloader_start.c Merge branch 'feature/bootloader_pin_level_pr7089' into 'master' 2021-07-13 05:39:25 +00:00
CMakeLists.txt bootloader: override the 2nd stage bootloader 2021-07-05 10:25:32 +08:00
component.mk soc: move peripheral linker scripts out of target component 2021-07-22 12:55:01 +08:00