Ap7000 Debug with mmu

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
I am designing a small OS currently. Taskswitching and Supervisorcalls are allready working well. Yesterday i have started to configure the MMU.
The OS is placed in P1 Segment so it is mapped to Flash and ext.ram directly without involving pagingfunctions.

Short:
OS-Programm @ 0x80000000 (Segmentmapped to 0x00000000)
OS-Stack @ 0x24000000 (Page mapped to 0x24000000)
OS-Heap @ 0x90000000 (Segmentmapped to 0x10000000)

Since internal SRAM (my Stack) needs to be mapped through paging, the JTAG issnt able to debug anymore. (Breakpoints are working but stackvariables cannot be read)
How to fix this :-) Normally it should work, since the MMU issnt translating anything :-/

Additional Info: the JTAG is reading 0xfdfdfdfd as soon as the MMU paginng is enabled. I do not understand this. JTAG is also capable of segmenttranslation. (Since it works to debug application at 0x80000000 that are running physically at 0x00000000)

I have a working USB connection. Would it be hard to write a debugger interface that is working over USB?
Memorytransfer and debugbreak(watch)points are the only thing that need to be implementd by OS. This should be possible. The harder work is the PC-client. Are there any documents that would help?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess you have run into cache problems in addition to virtual memory location.

None of the Atmel tools are able to debug when you start having cache and/or virtual memory.

I would recommend making a simple debug printf system, so you can dump vital data over a serial link, or as you have the USB link.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Caching can be disabled and there is no change in behavior.
I would really want use realy debugging. Where to find documents about how to write a client to the gdb debugger :-) I would at least take a look at it before i forget this idea