I've got a PIC32/MIPS project that heavily uses the TLB to map memory dynamically (virtual memory manager). It seems that if J-Link goes out and requests an address that isn't in the hardware TLB table, an exception is thrown. Is there a way to get jtag to respect the TLB?
Here's the scenario: I have a TLB interrupt handler that loads the TLB table. If I am accessing addresses in running code that aren't in the map in software, they would get loaded by the interrupt/exception. However if I'm at a breakpoint and a debug window (trace/memory) either intentionally or accidentally access unmapped memory (usually what happens) the happily progressing debug session vectors into an exception indicating a bad memory address access from the EJTAG segment DMSEG (0xFF200000).
It would be super great if somehow there were a way to make such bad memory accesses either:
1) Just read all 0's and not throw an exception or...
2) (BEST:) actually try to run my tlb exception handler which would load the hardware TLB.
3) Some way to force my debugger (eclipse/sourcery code control gdb) to never try to walk the stack. 99% of the time stack trace is what walks into unmapped memory.
If #2 could be done it would be awesome. The debugger would work happily with virtual memory managers. if not, my debugging sessions are very painful. I have to watch out that I don't view variables or memory that wasn't just accessed in code.
Anyone have experience with this issue? It seems like a basic requirement for Jtag with MIPS/pic32-- a feature that should be there. Maybe I'm overlooking something.
Thanks!!
Here's the scenario: I have a TLB interrupt handler that loads the TLB table. If I am accessing addresses in running code that aren't in the map in software, they would get loaded by the interrupt/exception. However if I'm at a breakpoint and a debug window (trace/memory) either intentionally or accidentally access unmapped memory (usually what happens) the happily progressing debug session vectors into an exception indicating a bad memory address access from the EJTAG segment DMSEG (0xFF200000).
It would be super great if somehow there were a way to make such bad memory accesses either:
1) Just read all 0's and not throw an exception or...
2) (BEST:) actually try to run my tlb exception handler which would load the hardware TLB.
3) Some way to force my debugger (eclipse/sourcery code control gdb) to never try to walk the stack. 99% of the time stack trace is what walks into unmapped memory.
If #2 could be done it would be awesome. The debugger would work happily with virtual memory managers. if not, my debugging sessions are very painful. I have to watch out that I don't view variables or memory that wasn't just accessed in code.
Anyone have experience with this issue? It seems like a basic requirement for Jtag with MIPS/pic32-- a feature that should be there. Maybe I'm overlooking something.
Thanks!!
The post was edited 1 time, last by Tj256 ().