tmedicci opened a new pull request, #16136:
URL: https://github.com/apache/nuttx/pull/16136

   ## Summary
   
   * boards/xtensa/esp32s3: Move some .bss sections to the external RAM
   
   This PR moves some internal libraries' .bss sections to the external PSRAM 
chip, freeing internal memory for other usages.
   
   Note that it is necessary to update `esp32s3-devkit:python` defconfig, 
otherwise it would fail to build.
   
   ## Impact
   
   Impact on user: YES. It frees internal memory by moving .bss sections to the 
external PSRAM.
   
   Impact on build: NO.
   
   Impact on hardware: NO.
   
   Impact on documentation: NO.
   
   Impact on security: NO.
   
   Impact on compatibility: NO.
   
   ## Testing
   
   The `esp32s3-devkit:python` defconfig can be used to check that the internal 
memory is freed.
   
   ### Building
   
   ```
   make -j distclean && ./tools/configure.sh esp32s3-devkit:python && make 
-j$(nproc)
   ```
   
   ### Running
   
   Just check the build log and compare the memory used by the internal memory 
(`dram0_0_seg`) and the external memory (`extern_ram_seg`)
   
   ### Results
   
   Before applying this patch:
   ```
   Memory region         Used Size  Region Size  %age Used
                ROM:    13807672 B   33554400 B     41.15%
        iram0_0_seg:       54016 B       304 KB     17.35%
        irom0_0_seg:     3771426 B   33554400 B     11.24%
        dram0_0_seg:      287564 B       288 KB     97.51%
        drom0_0_seg:    13676600 B   33554400 B     40.76%
       rtc_iram_seg:          0 GB       8168 B      0.00%
       rtc_data_seg:          0 GB       8168 B      0.00%
   rtc_reserved_seg:          24 B         24 B    100.00%
       rtc_slow_seg:          0 GB         8 KB      0.00%
     extern_ram_seg:    13846400 B   33554400 B     41.27%
   ```
   
   After applying this patch, internal memory usage decreased!
   ```
   Memory region         Used Size  Region Size  %age Used
                ROM:    13807672 B   33554400 B     41.15%
        iram0_0_seg:       54016 B       304 KB     17.35%
        irom0_0_seg:     3771426 B   33554400 B     11.24%
        dram0_0_seg:      267356 B       288 KB     90.66%
        drom0_0_seg:    13676600 B   33554400 B     40.76%
       rtc_iram_seg:          0 GB       8168 B      0.00%
       rtc_data_seg:          0 GB       8168 B      0.00%
   rtc_reserved_seg:          24 B         24 B    100.00%
       rtc_slow_seg:          0 GB         8 KB      0.00%
     extern_ram_seg:    13866592 B   33554400 B     41.33%
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to