ESP_LOGI Resets esp32

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

ESP_LOGI Resets esp32

Postby burkulesomesh43 » Sun Oct 07, 2018 6:49 am

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
--
Somesh Burkule

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP_LOGI Resets esp32

Postby loboris » Sun Oct 07, 2018 8:49 am

Your dev_name points to nowhere, you have to allocate some memory to which it points (and put something printable in it).

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP_LOGI Resets esp32

Postby Ritesh » Sun Oct 07, 2018 9:54 am

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
Regards,
Ritesh Prajapati

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: ESP_LOGI Resets esp32

Postby burkulesomesh43 » Sun Oct 07, 2018 6:13 pm

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..
--
Somesh Burkule

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP_LOGI Resets esp32

Postby Ritesh » Mon Oct 08, 2018 4:05 am

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.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: hdsjulian2 and 156 guests