when write trace32 scripts, sometimes see following codes:
data.set sd: 0x11000000 %be %long 0x12345678
what's the sd stand for?
Normal memory access commands can be used together with new access classes ’AHB:’ and ’APB:’ (old syntax: ’DAP:’). During runtime you need to add an
'E'->'EAHB:', 'EAPB:'.
Examples:
-------------------------
Data.Set APB:0x90003020 %Long 0x12345678
Data.dump AHB:0x80000000
-------------------------
If you want to access memory as seen by the core you can use the standard access classes like ’SD:’ for data and ’SR:’ or ’ST:’ for code memory. But the debugger can not access memory via the core when the core is running. If you want to get it accessed via AHB (MEM-AP of the DAP) only when the core is running
you need to add an ’E’ before the access class like ’ESD:’, ’ESR:’, ’EST:’
memory classes chapter.
To specify which and how target memory is accessed, there are memory classes. A memory class consists of one or more letters followed by a colon “:”. Memory classes can be applied almost everywhere an address has to be specified.
Here are some examples:
------------------------+-----------------------------------------------
Command | Effect
------------------------+-----------------------------------------------
DATA.LIST P:0x1000 | Opens a List window displaying program memory
------------------------+-----------------------------------------------
DATA.SET SPR:272. %Long | Write value 0x00223344 to SPRG0
0x00223344 |
------------------------+----------------------------------------------
The following memory classes are available:
---------------+-------------------------------------
Memory Class | Description
---------------+-------------------------------------
P | Program
---------------+-------------------------------------
D | Data
---------------+-------------------------------------
SPR | Special Purpose Register
---------------+-------------------------------------
IC | Instruction Cache
---------------+-------------------------------------
DC | Data Cache
---------------+-------------------------------------
L2 | Level 2 cache
---------------+-------------------------------------
NC | No Cache (only physical memory)
-----------------------------------------------------
In addition to the memory classes, there are memory class attributes. Examples:
------------------------+-------------------------------------------------
Command | Effect
------------------------+-------------------------------------------------
DATA.LIST SP:0x1000 | Opens a List window displaying supervisor program
| memory
------------------------+-------------------------------------------------
DATA.SET ED:0x3330 0x4F | Write 0x4F to address 0x3330 using real-time
| memory access
------------------------+-------------------------------------------------
The following memory class attributes are available:
------------------------+-------------------------------------------------
Memory Class Attribute | Description
------------------------+-------------------------------------------------
E | Use real-time memory access (not available on all CPUs)
------------------------+-------------------------------------------------
A | Given address is physical (bypass MMU)
------------------------+-------------------------------------------------
U | User memory
------------------------+-------------------------------------------------
S | Supervisor memory
------------------------+-------------------------------------------------
Memory class attributes can also be used without a memory class, but U: and S: are usually combined with D: and P: (UD: user data, SD: supervisor data, UP: user program, UD: user data).
阅读(3149) | 评论(0) | 转发(0) |