ESP8266 Developer Zone The Official ESP8266 Forum 2017-09-15T18:52:49+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=6388 2017-09-15T18:52:49+08:00 2017-09-15T18:52:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6388&p=15786#p15786 <![CDATA[Re: os_printf with a char pointer parameter causes an exception]]>
you beleive I have not tried without the dereferencing "star"?

Only, I agree with you that does take the pointer, not the dereferenced value like I described.
But in either case did not work for me.

Statistics: Posted by ddze7374 — Fri Sep 15, 2017 6:52 pm


]]>
2017-09-14T04:05:55+08:00 2017-09-14T04:05:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6388&p=15749#p15749 <![CDATA[Re: os_printf with a char pointer parameter causes an exception]]>
ddze7374 wrote:

Code:

static void ICACHE_FLASH_ATTR someCb(const char *data){
   os_printf( "LED = %s", *data);
}

Fatal exception 28(LoadProhibitedCause):
epc1=0x40245abe, epc2=0x00000000, epc3=0x40246461, excvaddr=0x00000023, depc=0x00000000
ÿ
ets Jan 8 2013,rst cause:2, boot mode:(1,6)



The call to os_printf should be

Code:

os_printf( "LED = %s", data);
without dereferencing data. Otherwise you use the value of the first character of data as a pointer, which points to 0x00000023 in your case (that's the value of excvaddr), which is wrong.

ddze7374 wrote:
Solved , the flash needs an access to the aligned data.


The original problem doesn't seem to have anything related to data alignment.

Statistics: Posted by jcmvbkbc — Thu Sep 14, 2017 4:05 am


]]>
2017-09-14T01:10:58+08:00 2017-09-14T01:10:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6388&p=15748#p15748 <![CDATA[Re: os_printf with a char pointer parameter causes an exception]]> Statistics: Posted by ddze7374 — Thu Sep 14, 2017 1:10 am


]]>
2017-09-13T22:28:16+08:00 2017-09-13T22:28:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6388&p=15746#p15746 <![CDATA[os_printf with a char pointer parameter causes an exception]]>
I am trying to debug some code and need to display the content of the char pointer. But everytime it gives an exception.

Code:

static void ICACHE_FLASH_ATTR someCb(const char *data){
   os_printf( "LED = %s", *data);
}


Fatal exception 28(LoadProhibitedCause):
epc1=0x40245abe, epc2=0x00000000, epc3=0x40246461, excvaddr=0x00000023, depc=0x00000000
ÿ
ets Jan 8 2013,rst cause:2, boot mode:(1,6)


Is there a way to access the content of this pointer ?

By the way is there a downloadable xtensa-lx106-elf-gdb debugger ?

Statistics: Posted by ddze7374 — Wed Sep 13, 2017 10:28 pm


]]>