175
Variable
CORESIGHT_IndexAPBAP-
ToUse
CORESIGHT_AHBAPCSWDe-
faultSettings
MAIN_ResetType
J-Link / J-Trace (UM08001)
CHAPTER 5
variable is necessary for example when debug-
ging multi-core devices where multiple AHB-APs are
present (one for each device). This function can on-
ly be used if a AP-layout has been configured via
JLINK_CORESIGHT_AddAP() .
Example
JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP);
JLINK_CORESIGHT_AddAP(2, CORESIGHT_APB_AP);
//
// Use second AP as AHB-AP
// for target communication
//
CORESIGHT_IndexAHBAPToUse = 1;
Pre-selects an AP as an APB-AP that J-Link uses
for debug communication (Cortex-A/R). Setting
this variable is necessary for example when debug-
ging multi-core devices where multiple APB-APs are
present (one for each device). This function can on-
ly be used if an AP-layout has been configured via
JLINK_CORESIGHT_AddAP() .
Example
JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
JLINK_CORESIGHT_AddAP(1, CORESIGHT_APB_AP);
JLINK_CORESIGHT_AddAP(2, CORESIGHT_APB_AP);
//
// Use third AP as APB-AP
// for target communication
//
CORESIGHT_IndexAPBAPToUse = 2;
Overrides the default settings to be used by the DLL
when configuring the AHB-AP CSW register. By de-
fault, the J-Link DLL will use the following settings for
the CSW:
Cortex-M0, M0+, M3, M4
[30] = 0
[28] = 0
[27] = 0
[26] = 0
[25] = 1
[24] = 1
Configurable settings
[30] = SPROT: 0 = secure transfer request
[28] = HRPOT[4]: Always 0
[27] = HRPOT[3]: 0 = uncachable
[26] = HRPOT[2]: 0 = unbufferable
[25] = HRPOT[1]: 0 = unprivileged
[24] = HRPOT[0]: 1 = Data access
Used to determine what reset type is currently select-
ed by the debugger. This is useful, if the script has to
behave differently in case a specific reset type is se-
lected by the debugger and the script file has a Re-
setTarget() function which overrides the J-Link reset
strategies.
Example
if (MAIN_ResetType = 2) {
[...]
} else {
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
Description
J-Link script files
R/W
WO
WO
RO
Need help?
Do you have a question about the J-Link and is the answer not in the manual?