Chat freely about anything...

User avatar
By hackrid
#248 I have loaded the resulting application binary (which I have uploaded here in the forum) to RAM using XTCOM_UTILITY.

after the IoT demo starts running, the following is repeated endlessly on the TX-Pin:


Code: Select allFatal exception (28): <\r><\n>
epc1=0x40240430, epc2=0x00000000, epc3=0x00000000, excvaddr=0x006102fc, depc=0x00000000



edit: I sacrificed one of my modules and flashed the resulting binary to the spi flash. but the excption printing remains :(
User avatar
By Bert
#256 For clarification:
EPCx = Level-x exception program counter (the higher levels seem to have something to do with high-priority interrupts)
EXCVADDR = Exception virtual address
DEPC = Double exception program counter

EPC1 points to the offending instruction, while EXCVADDR seems to point to where the offending instruction referred to.

My guess is that the number in the brackets corresponds to an EXCCAUSE register value, which (obviously) indicates the cause of the exception.

Exception cause 28 (EXCCAUSE_LOAD_PROHIBITED) seems to indicate that you are running into trouble with the MMU: it does not allow a load from that address (which would not be strange, given it's outside 0x40000000 - 0x402fffff).
User avatar
By Bert
#258 Hmm. Flashing may not be as simple as just burning said output file to the flash chip (or even worse, writing it to RAM directly): obviously, the memory addresses somehow have to be (re)mapped correctly. The files generated by genflashbinv6.exe are in some funky format, I'm not quite sure how suitable they are for direct flashing to anything.

If all is flashed/loaded properly, you should find BGEU a4, a6, 0x4024043b <wdt_init+0x287> (opcode 07b467) at position 0x40240430, which should IMHO not trigger such a fault (given it compares registers, and jumps to a location very nearby). You might want to check if you actually find this opcode at that address (or I guess actually 67 b4 07 due to endianness).