CN / EN
Doc Feedback
Thanks for your interest, welcome to contact us.
Thanks for your feedback

RAM Layout in Mirror Mode

The typical RAM layout in Mirror Mode is shown in Figure 10. You are able to modify the layout based on product needs.

Figure 10 RAM layout in Mirror Mode

The layout in Mirror Mode allows application code to be run in RAM. When the SoC is powered on, it goes into the cold boot process. The Bootloader copies application code from Flash to the RAM segment App Code Execution Region. When the SoC is awoken from Sleep Mode, it goes into the warm boot process. To shorten the warm boot time, the Bootloader does not copy the application code again to the RAM segment App Code Execution Region.

The start address of the RAM segment App Code Execution Region is determined by the macro APP_CODE_RUN_ADDR in custom_config.h. Developers shall determine the value of APP_CODE_RUN_ADDR based on the use of .data and .bss segments in the application, to prevent address overlapping with the .bss segment at a low address or the call stack segment at a high address. The distribution of RAM segments can be obtained from the .map file.

It is recommended that developers use RAM Aliasing Memory address (0x0080_0000–0x0083_FFFF) to set APP_CODE_RUN_ADDR. In the case of RAM segment overlapping, an error will occur and the overlapping position will be prompted during project building, to help developers check and quickly locate the RAM segment overlapping.

Scan to follow

Open WeChat, use "Scan" to follow.