How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

panjikuai
Posts: 4
Joined: Tue Feb 28, 2017 7:03 am

How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

Postby panjikuai » Wed Mar 29, 2017 12:50 pm

How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,
there is no specific information was output after compiling .

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

Postby BuddyCasino » Wed Mar 29, 2017 7:15 pm

You can check heap like this:

Code: Select all

ESP_LOGI(TAG, "RAM left %d", esp_get_free_heap_size());
To find out if you can reduce the FreeRTOS stack size of the currently executing task to free some memory you can query the high watermark like this:

Code: Select all

ESP_LOGI(TAG, "task stack: %d", uxTaskGetStackHighWaterMark(NULL));
I never ran into code size limitations with the 4MB of flash, so I don't know how to help with that.

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

Postby f.h-f.s. » Fri Mar 31, 2017 11:56 am

Don't forget your 32bit aligned free space. xPortGetFreeHeapSizeTagged(MALLOC_CAP_32BIT)

VisualGDB gives you a memory utilization report after building your project. Which lists your used DATA_FLASH, INSTR_FLASH, INSTR_RAM and DATA_RAM. No idea how they do this though.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

Postby ESP_igrr » Fri Mar 31, 2017 2:03 pm

xtensa-esp32-elf-size build/app-name.elf maybe?

f.h-f.s.
Posts: 215
Joined: Thu Dec 08, 2016 2:53 pm

Re: How to check current project's the resource(RAM, TEXT,HEAP etc.) usage statistics,

Postby f.h-f.s. » Tue Apr 04, 2017 1:04 pm

Aah ok that works =D

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 56 guests