How do I configure the memory map?

hjalfi
Posts: 9
Joined: Sat Oct 02, 2021 9:38 am

How do I configure the memory map?

Postby hjalfi » Sun Nov 07, 2021 3:52 pm

I would like to tell ESP-IDF to completely ignore certain memory areas --- SRAM0 and 2, mostly. This will be used by custom non-FreeRTOS code. Is there a way to tell the configuration tool to do this?

ESP_Sprite
Posts: 9770
Joined: Thu Nov 26, 2015 4:08 am

Re: How do I configure the memory map?

Postby ESP_Sprite » Mon Nov 08, 2021 4:40 am

I think that should be possible by calling the SOC_RESERVE_MEMORY_REGION in your C file. That macro uses Deeper Linker Shenanigans, so I *think* it should keep both the runtime allocator as well as the linked static memories out of that region, but I'm not 100% sure about the latter.

hjalfi
Posts: 9
Joined: Sat Oct 02, 2021 9:38 am

Re: How do I configure the memory map?

Postby hjalfi » Sun Nov 14, 2021 1:00 pm

(Sorry, never got a notification from the forum software...)

It looks like SOC_RESERVE_MEMORY_REGION only configures heap allocation, and doesn't actually modify the linker script --- I still get code mapped to the bits of SRAM0 that I need even if I reserve it all. I have a nasty feeling that I may simply not be able to do what I want with esp-idf (which is to leave the two MMU areas untouched so that I can do my own memory management there).

Who is online

Users browsing this forum: No registered users and 76 guests