Memory Layout BUG Overlap on BOOT

Baldhead
Posts: 122
Joined: Sun Mar 31, 2019 5:16 am

Memory Layout BUG Overlap on BOOT

Postby Baldhead » Fri May 22, 2020 6:50 pm

Hi,

I am trying to use external spiram in my application as much as i can( wifi, lwip, https server, one socket uses ~ 40kB RAM with SSL, and so on), because i need internal ram memory for other purposes.

The i2s hardware module has a bug that i cannot use dma transfers with sizes less than 32 bits, soh i need to copy a "big" 8 bit buffer in slices to send to a lcd display.
So, if i use two buffers with 3840 pixels(2 bytes per pixel -> 7680 bytes), i need 7680*2 bytes = 15360 bytes only for graphics library write in then, taking out other bytes that lib uses for scratch.
I need more 2 dma buffers with 32 bits. So i need 7680*4 =30720 bytes per buffer. 2 buffers = 30720*2 = 61440 bytes only in two dma buffers.
61440 bytes in two dma buffers + 15360 bytes in two graphics lib buffers = 76800 bytes.

I would like to work with at least twice that 153600 bytes.
Before adding other features to the project i could do this.

When i enable External SPIRAM on idf.py menuconfig:
Component config → mbedTLS → Memory allocation strategy → External SPIRAM.

The compilation was successful, then i flash the program inside esp32, but when i boot the esp32 the program doesnt work.
Then i execute the command "idf.py -p COM7 monitor", and the following error appears:
memory_layout: SOC_RESERVE_MEMORY_REGION region range 0x3f800000 - 0x40000000 overlaps with 0x3ffae000 - 0x3ffae6e0


Summarizing the subject:

* How to transfer some kilobytes from heap dynamic internal memory to statically allocated internal memory on esp-idf ?

* Can i put these items in the spi ram ?
if i can. What do i need to do ?
items: wifi, lwip, https server, all needed sockets that uses ~ 40kB RAM with SSL.

* How to solve this problem ?
memory_layout: SOC_RESERVE_MEMORY_REGION region range 0x3f800000 - 0x40000000 overlaps with 0x3ffae000 - 0x3ffae6e0


Notes:
* esp-idf version: v4.2-dev-1235-g71dc5eb27
* win10 pro

Thank's.
Last edited by Baldhead on Sat May 23, 2020 3:58 am, edited 2 times in total.

Baldhead
Posts: 122
Joined: Sun Mar 31, 2019 5:16 am

Re: Memory Layout BUG Overlap

Postby Baldhead » Sat May 23, 2020 3:39 am

In idf.py menuconfig i changed back to internal ram:
Component config → mbedTLS → Memory allocation strategy → internal ram.

Even after switching back to internal memory, the boot error remained:
memory_layout: SOC_RESERVE_MEMORY_REGION region range 0x3f800000 - 0x40000000 overlaps with 0x3ffae000 - 0x3ffae6e0

I tried to delete the build folder, recompile, flash, but unsuccessfully with the same error on boot.

I needed to delete build folder and all sdkconfig files, execute "idf.py menuconfig" and edit all needed fields, recompile, flash and the program worked again.

Who is online

Users browsing this forum: No registered users and 8 guests