In the ColdFire V1 target, the triggers, A, B, and C are used to start and stop the trace collection. The triggers, A and B are set on a function address and trigger C is set on a variable address. The trace collection starts or ends depending on the trace mode selected along with a combination of the following actions involving A, B, and C.
- Trace is always enabled - Trace remains enabled all the time during the application run. The trace data is collected from the beginning till end of the debug session.
- Trace from Trigger A Onward - Trace is disabled initially. Once the application starts and the execution reaches the instruction where trigger A is set, trace is automatically enabled by the hardware, without stopping the core. Trace remains enabled for the rest of the debug session, that is until you suspend the application.
- Trace from Trigger A to Trigger B - The trace gets enabled at trigger A and starts collecting from there. Once the execution reaches the instruction where trigger B is set, the trace is automatically disabled by the hardware. After the trace is disabled, it is not restarted. However, if the application is stopped either automatically or manually, the CodeWarrior resets the trace module. Therefore, if you resume the application later and the execution reaches trigger A again, trace automatically restarts and repeats the same cycle.
- Trace from Trigger A to Trigger C - Same as Trace from Trigger A to Trigger B except that trigger C is set on the variable addresses.
- Trace from Trigger B Onward - The application starts and enables trace at trigger B, which remains enabled through out the debug session.
- Trace from Trigger B to Trigger A - Trace enables at trigger B and disables at trigger A. The trace collection follows the same approach as Trace from Trigger A to Trigger B.
- Trace from Trigger B to Trigger C - Trace enables at trigger B and disables at trigger C. The trace collection follows the same approach as Trace from Trigger A to Trigger B.
- Trace from Trigger C Onward - The application starts and enables trace at trigger C, which remains enabled through out the debug session.
- Trace from Trigger C to Trigger A - Trace enables at trigger C and disables at trigger A. The trace collection follows the same approach as Trace from Trigger A to Trigger B.
- Trace from Trigger C to Trigger B - Trace enables at trigger C and disables at trigger B. The trace collection follows the same approach as Trace from Trigger A to Trigger B.
Note: In the Automatic (One-buffer) mode, if you check the Halt the Target when Trace Buffer Gets Full checkbox, the trace starts collecting from trigger A till the buffer gets full. If you do not check the checkbox, the trace is collected till you suspend the application manually. And you will only see the last portion of trace in the Trace Data viewer because the internal trace buffer is overwritten. It holds for all the above options.
Warning: Do not use breakpoints with triggers when collecting trace on the ColdFire V1 target. This is because there is only one hardware debug module on ColdFire V1 which is shared for setting hardware breakpoints or trace triggers. So you can either set breakpoint or trace trigger using this debug module.