EasyManua.ls Logo

Segger J-Link - Cache Handling

Segger J-Link
480 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
244 CHAPTER 5 Working with J-Link and J-Trace
J-Link / J-Trace (UM08001) ©
2004-2017 SEGGER Microcontroller GmbH & Co. KG
5.14 Cache handling
Most target systems with external memory have at least one cache. Typically, ARM7
systems with external memory come with a unified cache, which is used for both
code and data. Most ARM9 systems with external memory come with separate caches
for the instruction bus (I-Cache) and data bus (D-Cache) due to the hardware archi-
tecture.
5.14.1 Cache coherency
When debugging or otherwise working with a system with processor with cache, it is
important to maintain the cache(s) and main memory coherent. This is easy in sys-
tems with a unified cache and becomes increasingly difficult in systems with hard-
ware architecture. A write buffer and a D-Cache configured in write-back mode can
further complicate the problem.
ARM9 chips have no hardware to keep the caches coherent, so that this is the
responsibility of the software.
5.14.2 Cache clean area
J-Link / J-Trace handles cache cleaning directly through JTAG commands. Unlike
other emulators, it does not have to download code to the target system. This makes
setting up J-Link / J-Trace easier. Therefore, a cache clean area is not required.
5.14.3 Cache handling of ARM7 cores
Because ARM7 cores have a unified cache, there is no need to handle the caches dur-
ing debug.
5.14.4 Cache handling of ARM9 cores
ARM9 cores with cache require J-Link / J-Trace to handle the caches during debug. If
the processor enters debug state with caches enabled, J-Link / J-Trace does the fol-
lowing:
When entering debug state
J-Link / J-Trace performs the following:
It stores the current write behavior for the D-Cache.
It selects write-through behavior for the D-Cache.
When leaving debug state
J-Link / J-Trace performs the following:
It restores the stored write behavior for the D-Cache.
It invalidates the D-Cache.
Note: The implementation of the cache handling is different for different cores.
However, the cache is handled correctly for all supported ARM9 cores.

Table of Contents

Other manuals for Segger J-Link

Related product manuals