Memory Layout BUG Overlap on BOOT
Posted: 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
* ESP32-DevKitC-VB
* win10 pro
Thank's.
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
* ESP32-DevKitC-VB
* win10 pro
Thank's.