ESP8266 Developer Zone The Official ESP8266 Forum 2018-08-15T15:32:20+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=6969 2018-08-15T15:32:20+08:00 2018-08-15T15:32:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=22769#p22769 <![CDATA[Re: LoadStoreErrorCause help]]>
So there is nothing wrong with it. What I have to do now is refactor some of my C structures mapping some UINT8 stuff stored in the FLASH.

Statistics: Posted by sedlacek.david — Wed Aug 15, 2018 3:32 pm


]]>
2018-08-15T08:11:47+08:00 2018-08-15T08:11:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=22767#p22767 <![CDATA[Re: LoadStoreErrorCause help]]> Statistics: Posted by blubb — Wed Aug 15, 2018 8:11 am


]]>
2018-08-15T01:15:17+08:00 2018-08-15T01:15:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=22766#p22766 <![CDATA[Re: LoadStoreErrorCause help]]> Statistics: Posted by sedlacek.david — Wed Aug 15, 2018 1:15 am


]]>
2018-08-05T22:21:28+08:00 2018-08-05T22:21:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=22539#p22539 <![CDATA[Re: LoadStoreErrorCause help]]>

Code:

const char * p = 0x40280000
and read it like

Code:

int x = *p
. This works.
But when I have a pointer like this:

Code:

UINT32 addr = 0x40280000;
const char * p = (const char *)addr;


it will crash:

Code:

Fatal exception 3(LoadStoreErrorCause):
                                       
epc1=0x402430ec, epc2=0x00000000, epc3=0x00000000, excvaddr=0x40280000, depc=0x0
0000000


Don't understand...

Statistics: Posted by sedlacek.david — Sun Aug 05, 2018 10:21 pm


]]>
2017-10-19T06:31:12+08:00 2017-10-19T06:31:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=16515#p16515 <![CDATA[Re: LoadStoreErrorCause help]]> Statistics: Posted by smbgaiden — Thu Oct 19, 2017 6:31 am


]]>
2017-10-19T05:06:14+08:00 2017-10-19T05:06:14+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6969&p=16512#p16512 <![CDATA[LoadStoreErrorCause help]]>
I've written some strings into spi flash and then try to access using the virtual memory addressing and have a weird behavior that I can't figure out how to cope with.

Flashed my equal sized strings with esptool.py to 0x80000. Verified they're there via two ways:
A.
char* p = (char *)0x40280000;
os_printf("%c%c%c%c\n", p[0], p[1], p[2], p[3]);

B.
spi_flash_read(0x80000, temp, sizeof(temp));
os_printf("SPI Read: 0x%X 0x%X 0x%X 0x%X\n", temp[0], temp[1], temp[2], tem$

Compared the hex vs. the chars vs. the bin I wrote there and everything was fine.

Now if I do:
char * p =(char *)0x40280064; // this is a valid string address starting point and is smaller than the bin file written into 0x80000

os_printf(p); // This is good! See my string printed over serial.
// But if I do this:
os_printf("This is my string: %s", p); // this throws me out the following before reset:

This is my string: Fatal exception 3(LoadStoreErrorCause):
epc1=0x4000228b, epc2=0x00000000, epc3=0x00000000, excvaddr=0x40280064, depc=0x0

Closest address to 0x4000228b seems to be:
40001f00 g *ABS*00000000 ets_vprintf
; which makes sense for os_printf to call.

Does anyone know why I can directly use a pointer to virtual indexed memory with os_printf and have a good result vs. having the printf code look it up via a va_list causes the LoadStoreErrorCause?

Statistics: Posted by smbgaiden — Thu Oct 19, 2017 5:06 am


]]>