J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
207
5.11.1.3 SetupTarget()
Description
If present, called after InitTarget() and after general debug connect sequence has
been performed by J-Link. Usually used for more high-level CPU debug setup like
writing certain memory locations, initializing PLL for faster download etc.
Prototype
void SetupTarget(void);
Notes / Limitations
• Does not replace any DLL functionality but extends it.
•May use MEM_ API functions
5.11.1.4 ResetTarget()
Description
Replaces reset strategies of DLL. No matter what reset type is selected in the DLL, if
this function is present, it will be called instead of the DLL internal reset
Prototype
void ResetTarget(void);
Notes / Limitations
• DLL expects target CPU to be halted / in debug mode, when leaving this function
•May use MEM_ API functions
5.11.1.5 InitEMU()
Description
If present, it allows configuration of the emulator prior to starting target communica-
tion. Currently this function is only used to configure whether the target which is
connected to J-Link has an ETB or not. For more information on how to configure the
existence of an ETB, please refer to Global DLL variables on page 213.
Prototype
void InitEMU(void);
5.11.1.6 OnTraceStop()
Description
Called right before capturing of trace data is stopped on the J-Link / J-Trace. On
some target, an explicit flush of the trace FIFOs is necessary to get the latest trace
data. If such a flush is not performed, the latest trace data may not be output by the
target
Prototype
void OnTraceStop(void);
Notes / Limitations
• May use MEM_ functions
5.11.1.7 OnTraceStart()
Description
If present, called right before trace is started.