Page 1 of 1

ESP_LOGI Resets esp32

Posted: Sun Oct 07, 2018 6:49 am
by burkulesomesh43
Hi,
I want to print uint8_t pointer but if I use EPS_LOGI it resets esp32
Here is instruction->
uint8_t *dev_name;
ESP_LOGI("SS","dev_name: %s",(char*)dev_name);

Error:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 0 register dump:
PC : 0x400d287d PS : 0x00060130 A0 : 0x00000000 A1 : 0x3ffbb430
A2 : 0x00000000 A3 : 0x3ffb33a8 A4 : 0x3ffb1090 A5 : 0x3ffb1094
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d2878 A9 : 0x3ffbb410
A10 : 0x00000558 A11 : 0x3f403bb0 A12 : 0x0000001e A13 : 0x0000001f
A14 : 0x000000ff A15 : 0x00000003 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd

Backtrace: 0x400d287d:0x3ffbb430 0x7ffffffd:0x3ffbb470

Re: ESP_LOGI Resets esp32

Posted: Sun Oct 07, 2018 8:49 am
by loboris
Your dev_name points to nowhere, you have to allocate some memory to which it points (and put something printable in it).

Re: ESP_LOGI Resets esp32

Posted: Sun Oct 07, 2018 9:54 am
by Ritesh
burkulesomesh43 wrote:Hi,
I want to print uint8_t pointer but if I use EPS_LOGI it resets esp32
Here is instruction->
uint8_t *dev_name;
ESP_LOGI("SS","dev_name: %s",(char*)dev_name);

Error:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 0 register dump:
PC : 0x400d287d PS : 0x00060130 A0 : 0x00000000 A1 : 0x3ffbb430
A2 : 0x00000000 A3 : 0x3ffb33a8 A4 : 0x3ffb1090 A5 : 0x3ffb1094
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d2878 A9 : 0x3ffbb410
A10 : 0x00000558 A11 : 0x3f403bb0 A12 : 0x0000001e A13 : 0x0000001f
A14 : 0x000000ff A15 : 0x00000003 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd

Backtrace: 0x400d287d:0x3ffbb430 0x7ffffffd:0x3ffbb470
Please allocate some memory as per your requirement and then print it. then de-allocate it once you won't require it

Re: ESP_LOGI Resets esp32

Posted: Sun Oct 07, 2018 6:13 pm
by burkulesomesh43
Ritesh wrote:
burkulesomesh43 wrote:Hi,
I want to print uint8_t pointer but if I use EPS_LOGI it resets esp32
Here is instruction->
uint8_t *dev_name;
ESP_LOGI("SS","dev_name: %s",(char*)dev_name);

Error:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 0 register dump:
PC : 0x400d287d PS : 0x00060130 A0 : 0x00000000 A1 : 0x3ffbb430
A2 : 0x00000000 A3 : 0x3ffb33a8 A4 : 0x3ffb1090 A5 : 0x3ffb1094
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d2878 A9 : 0x3ffbb410
A10 : 0x00000558 A11 : 0x3f403bb0 A12 : 0x0000001e A13 : 0x0000001f
A14 : 0x000000ff A15 : 0x00000003 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd

Backtrace: 0x400d287d:0x3ffbb430 0x7ffffffd:0x3ffbb470
Please allocate some memory as per your requirement and then print it. then de-allocate it once you won't require it
thanks. It works now..

Re: ESP_LOGI Resets esp32

Posted: Mon Oct 08, 2018 4:05 am
by Ritesh
burkulesomesh43 wrote:
Ritesh wrote:
burkulesomesh43 wrote:Hi,
I want to print uint8_t pointer but if I use EPS_LOGI it resets esp32
Here is instruction->
uint8_t *dev_name;
ESP_LOGI("SS","dev_name: %s",(char*)dev_name);

Error:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 0 register dump:
PC : 0x400d287d PS : 0x00060130 A0 : 0x00000000 A1 : 0x3ffbb430
A2 : 0x00000000 A3 : 0x3ffb33a8 A4 : 0x3ffb1090 A5 : 0x3ffb1094
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800d2878 A9 : 0x3ffbb410
A10 : 0x00000558 A11 : 0x3f403bb0 A12 : 0x0000001e A13 : 0x0000001f
A14 : 0x000000ff A15 : 0x00000003 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd

Backtrace: 0x400d287d:0x3ffbb430 0x7ffffffd:0x3ffbb470
Please allocate some memory as per your requirement and then print it. then de-allocate it once you won't require it
thanks. It works now..
great. sounds good to hear that.