AnsweredAssumed Answered

Crash on register write

Question asked by BrendanDoonan on Mar 7, 2016
Latest reply on Mar 14, 2016 by Sinan Akman

I am using an i.MX6S, with 512MB RAM, which boots via u-boot off of an SD card.  I pause at the U-Boot prompt and attach to the processor through the JTAG port in order to run my code with the processor already set up.  I'm using GDB through Eclipse to view the code and debug it.  Everything seems to be in working order up to a certain point; I can view memory and registers correctly, step through code, etc.  However, as soon as I try to write certain registers, everything crashes.  The program counter walks off into ~0xffff0000.  What could be causing this type of behavior?  I am running in supervisor mode, which I have verified by looking at CPSR (0x600001d3).  The address in question is in a call to "mxc_init_l2x0", specifically this line:




This is trying to write the value 0x132 to address 0x00a02108.  If I look at that memory address, I can see that it is already set for that value, implying that U-Boot already set it up.  However, if I try to change the value at that address with the debugger, Eclipse tells me "Edit failed: Target request failed: Cannot access memory at address 0x00a02108"  If I let that line of code execute, the code crashes (presumably hitting a Data Abort exception).


Why can't I write registers?