[softwarelist] Re: DPScan + ARMini -> crash?

  • From: David Pilling <flist@xxxxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Thu, 7 Jul 2011 21:57:41 +0100

Hi,

In message <51eebd31e8chris@xxxxxxxxxxxxxxxxxxxxx>, Chris Johnson <chris@xxxxxxxxxxxxxxxxxxxxx> writes
I'm about to give your latest test version a whirl, though I have had
a couple of glasses of the amber nectar tonight, so I hope I shall be
in full control of the situation 8o).

Thanks Chris, that version had the problem code commented out and it didn't crash. One assumes this means there is not random corruption or some external event going on - or else other code would fail.

I thought I'd write a daily email about this problem until someone gets fed up and tells me the answer...

The crash occurs with the program counter pointing at the last instruction below:

ADD     R13,R13,#4
LDR     R6,&0008FB24
LDR     R5,&00090490
CMP     R0,#0
BLT     &00090480

From this we deduce that code executing 8 bytes back was what caused the address exception. We know that the LDR R6 executed correctly from the register dump and being able to read off the contents of the location it is loading from. (Thanks Martin for this).

Both the LDRs are loading words from memory addresses in the program's RunImage - good legal memory addresses.

This code is executed in the main poll loop, so before the crash it has been executed 100's of times. From dumping the program's memory we know that the code has not been corrupted.

There is the external change theory, the memory has been paged out or read protected - seems unlikely unless the ARMmini has a 1K page size.

An interrupt/software event? would have to be one that was fine tuned to take place after a save.

I am inclined to revert to crude debugging techniques, plaster the code with printf's and see what happens.


--
David Pilling
email: david@xxxxxxxxxxxxxxxxxxx
  web: http://www.davidpilling.net
 post: David Pilling, P.O. Box 22, Thornton-Cleveleys, Blackpool. FY5 1LR. UK
To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: