6.11 About debugging TrustZone enabled targets

ARM TrustZone® is a security technology designed into some ARM processors. For example, the Cortex™-A class processors. It segments execution and resources such as memory and peripherals into secure and normal worlds.
When connected to a target that supports TrustZone and where access to the secure world is permitted, then the debugger provides access to both secure and normal worlds. In this case, all addresses and address-related operations are specific to a single world. This means that any commands you use that require an address or expression must also specify the world that they apply to, with a prefix. For example N:0x1000 or S:0x1000.
Where:
N:
For an address in Normal World memory.
S:
For an address in Secure World memory.
If you want to specify an address in the current world, then you can omit the prefix.
When loading images and debug information it is important that you load them into the correct world. The debug launcher panel does not provide a way to directly specify an address world for images and debug information, so to achieve this you must use scripting commands instead. The Debugger tab in the debugger launcher panel provides an option to run a debug initialization script or a set of arbitrary debugger commands on connection. Here are some example commands:
  • Load image only to normal world (applying zero offset to addresses in the image)
    load myimage.axf N:0
  • Load debug information only to secure world (applying zero offset to addresses in the debug information)
    file myimage.axf S:0
  • Load image and debug information to secure world (applying zero offset to addresses)
    loadfile myimage.axf S:0
When an operation such as loading debug symbols or setting a breakpoint needs to apply to both normal and secure worlds then you must perform the operation twice, once for the normal world and once for the secure world.
Registers such as $PC have no world. To access the content of memory from an address in a register that is not in the current world, you can use an expression, N:0+$PC. This is generally not necessary for expressions involving debug information, because these are associated with a world when they are loaded.
Related reference
11.4 Breakpoints view
11.6 Commands view
11.7 Debug Control view
11.8 Disassembly view
11.14 Memory view
11.16 Modules view
11.17 Registers view
11.26 Variables view
Related information
DS-5 Debugger commands
ARM Security Technology Building a Secure System using TrustZone Technology
Technical Reference Manual
Architecture Reference Manual
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.