ConfigTargetSettings()
Revision as of 11:27, 22 April 2024 by Matthias (talk | contribs) (Created page with "Called before InitTarget(). Mainly used to set some global DLL variables to customize the normal connect procedure. For ARM CoreSight devices this may be specifying the ba...")
Called before InitTarget(). Mainly used to set some global DLL variables to customize the normal connect procedure. For ARM CoreSight devices this may be specifying the base address of some CoreSight components (ETM, CTI, ...) that cannot be auto-detected by J-Link due to erroneous ROM tables etc. May also be used to specify the device name in case debugger does not pass it to the DLL.
_
Contents
_
Prototype
int ConfigTargetSettings(void);
Notes and Limitations
May not, under absolutely NO circumstances, call any API functions that perform target communication.
- Should only set some global DLL variables
Defining the JTAG chain
Defining the AP map
int ConfigTargetSettings(void) {
JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // AP0
JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // AP1
JLINK_CORESIGHT_AddAP(2, CORESIGHT_APB_AP); // AP2
return 0;
}
Selecting a specific AP
int ConfigTargetSettings(void) {
JLINK_CORESIGHT_IndexAHBAPToUse = 0; // Select AP0 as AHB-AP
JLINK_CORESIGHT_IndexAPBAPToUse = 2; // Select AP2 as APB-AP
return 0;
}