ESP32 INSTR_RAM

JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

ESP32 INSTR_RAM

Postby JSchaef » Mon Feb 25, 2019 2:40 pm

Hi,
how can I increase/change the size of INSTR_RAM and/or DATA_RAM?
I'm using VisualGDB and at the end of the compiling run I get the following summary:

Code: Select all

------------------- Memory utilization report -------------------
Used DATA_FLASH: 257KB out of 8192KB (3%) [+80]
Used INSTR_FLASH: 1002KB out of 3264KB (30%) [+48]
Used INSTR_RAM: 127KB out of 128KB (99%)
Used DATA_RAM: 88KB out of 320KB (27%)
I thought, when moving to an ESP32 with external PSRAM (WROVER with 8MB ext. PSRAM) the (mapped) RAM size will be increased.
Maybe I'm using the wrong switches...

Any ideas?
Regards
Jorg

JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

Re: ESP32 INSTR_RAM

Postby JSchaef » Tue Mar 05, 2019 11:58 am

Any ideas?

Regards
Jorg

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 INSTR_RAM

Postby WiFive » Tue Mar 05, 2019 1:10 pm

You can't use psram as iram.
Last edited by WiFive on Tue Mar 05, 2019 1:29 pm, edited 2 times in total.

JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

Re: ESP32 INSTR_RAM

Postby JSchaef » Tue Mar 05, 2019 1:16 pm

Ok, I understand.

But can I change the size of INSTR_RAM / DATA_RAM?
(I mean, my program needs more INSTR_RAM.)
Where is the configuration for this?

Best regards
Jorg

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 INSTR_RAM

Postby WiFive » Tue Mar 05, 2019 1:29 pm

You can probably make iram bigger and reduce heap by modifying linker scripts.

JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

Re: ESP32 INSTR_RAM

Postby JSchaef » Tue Mar 05, 2019 1:38 pm

Thanks for your response.

How / where can I change it?
I haven't done it before.

Regards
Jorg


JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

Re: ESP32 INSTR_RAM

Postby JSchaef » Tue Mar 05, 2019 2:51 pm

Hi Wifive,

do I understand it right, that I can change the "len" in line 31, lets say to 0x40000?
Is this new memory area (with the greater range of 0x40000) from 0x40080000 to 0x400C0000 free, or is mapped to something else?
What is the max. size for this?

Second, where is the "CONFIG_TRACEMEM_RESERVE_DRAM" defined in line 81?

Regards
Jorg

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 INSTR_RAM

Postby WiFive » Tue Mar 05, 2019 11:00 pm

No, every sector you add to iram you have to take away from internal heap so you might run out of that too. You should only add as little as possible and try to reduce your iram usage.

JSchaef
Posts: 13
Joined: Fri Jan 25, 2019 8:39 am

Re: ESP32 INSTR_RAM

Postby JSchaef » Wed Mar 06, 2019 6:47 am

Yes, I know.

So back to my question:
I changed the line 31 to an incremented size ("len").
Now I recompiled the whole project - but nothing was changed in IRAM size.

Do I have to compile the esp32.ld first? (But this should be linker file)
Or is it the wrong file and I have to change the IRAM somwhere else?

Regards
Jorg

Who is online

Users browsing this forum: Bing [Bot] and 156 guests