Chat freely about anything...

User avatar
By lampshade
#19331 Hey,
I just tried to connect the esp8266 with the mcp9808 sensor. I tested it with the lua examples and it worked quite good. But as I had to write a c-code I actually need some help. I'm sure that the array thing in my code is wrong, it would be nice if someone could point me to the right side ;) The first part connecting to my AP works.


With this code i get a Fatal exception (28):
epc1=0x4000228b epc2=0x00000000 epc3=0x00000000

Thank you!
Last edited by lampshade on Sat Jun 06, 2015 5:47 am, edited 1 time in total.
User avatar
By cal
#19342 Moin,

you can locate the problem with logic or let the computer show you the line of the problem.
I explain the latter.

Exception 28 means you load from a memory position you should not load from.

corebits.h:
Code: Select all#define EXCCAUSE_LOAD_PROHIBITED   28   /* Cache Attribute does not allow Load */


epc1 is the program counter of the offending instruction.
excvaddr (the value you didn't copied because ...) is the memory location accessed

objdump can be used to show the assembler code with C source code of your program.
Make sure you compile and link with "-g".

For me that would be:
Code: Select allxtensa-lx106-elf-objdump -Sd app/.output/eagle/debug/image/eagle.app.v6.out | less


Then just look for

Code: Select all4000228b


and think why that loads from the address contained in excvaddr.

Cal