This hint applies to Cortex-M devices enabled for capturing trace
when debugging on hardware. After a software RESET, the CPU is put
into the default debug mode. While the personal debug settings are
restored automatically, the Trace Port Interface Unit (TPIU) remains
disabled. As a consequence, trace is no longer captured. To overcome
this pitfall, use the special debug function
OnResetExec() in the initialization file for
enabling the TPIU without restarting a debug session.
Generalized example for an initialization file:
FUNC void EnableTPIU (void) { // function with initialization statements
// code to initialize TPIU
}
EnableTPIU(); // executes whenever a debug session is started.
FUNC void OnResetExec (void) { // executes upon software RESET; Use the function name as is
EnableTPIU(); // call the initialization function
}
Initialization examples for devices that enable the 4-PIN Trace
(ETM) TPIU are located in Configure
Cortex-M Devices for Tracing of the ULINKpro User's
Guide.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.