Page 1 of 1

External SPIRAM heap and OCD JTAG

Posted: Thu Aug 29, 2019 9:10 am
by kolio_gg
Hello,
I decide to try PSRAM on ESP-WROVER-KIT-VB. I faced strange problem when use JTAG debuger and try simply to allocate memory from external SPI RAM.

Code: Select all

void app_main()
{
	char *p = heap_caps_malloc(400000, MALLOC_CAP_SPIRAM);
	if(p)
		strcpy(p, "1234");
	printf("Test %s\n", p);
	free(p);
	......
The result when debug project is heap assertion:

Code: Select all

        MULTI_HEAP_ASSERT(is_free(b), b); // block should be free
and panic message:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited) at pc=40091733. Setting bp and returning.

When just run application without debugger everything goes well without any problems.
What can be a reason? Is JTAG debug reflect some how for external SPI RAM access?
My be I miss something.
Thank you.