Hi Igor,
I didn't find any initialization scripts for Lauterbach in the SDK. I just found the menu and peripheral description files. Anyway I use an adapted variant on the initialization scripts from this thread:
i.MX6 initialization and start-up scripts
Back to your question, the code that initially did the mmu+caches enable was the linux kernel decompressor of a zImage, which was loaded before by my bootloader, which didn't make use of either one. Thus, yes the code which enabled the DCache also enabled the MMU with some basic 1 to 1 mapping. Anyway I didn't use the example code from the SDK, as the code which enabled MMU+caches was not my code.
Investigating the problem with my recent tests I didn't load any code either. I configured the respective IO-lines on by board, that the ROM-Bootloader waits for the 'Serial Download' Connection via USB. With the ROM-Code executing I connected to the processor with my Lauterbach and stopped execution with the break command. The list command shows that the processor stops somwhere arround 0x00000FB6. Watching at the MMU registers (especially SCTLR) Shows, that MMU, ICache and DCache are disabled. Watching the SCR Shows, that the processor is in secure state.
At this time I'm just modifying the DCache bit via Lauterbach to enable the DCache. Afterwards, when stepping, the first step in the list window hangs up the Lauterbach with 'Emulation debug port fail'.
If I repeat the same procedure using list NC:r(PC) instead of the plain list command, I can further step througn the code.
So for the recent tests the MMU was not enabled thus I would exclude a faulty MMU mapping. It seams that any reads initiated by the Lauterbach debugger going through the DCache hang up the debugger. Thus either the cache access by the Lauterbach might be faulty or a possible cache miss by the Lauterbach leads to the failure.
Regards, Frank