Files
Artery-AT32-PlatformIO/.platformio/packages/tool-jlink/Devices/AT/AT32F4xx/AT32F4xx.JLinkScript
V24473 b117c0d5c7 jlink
2022-01-11 09:54:08 +08:00

45 lines
1.1 KiB
Plaintext

/*********************************************************************
* (c) SEGGER Microcontroller GmbH & Co. KG *
* The Embedded Experts *
* www.segger.com *
**********************************************************************/
/*
* ConfigTargetSettings()
* - called before InitTarget()
* - set some global DLL variables to customize the normal connect procedure
*/
int ConfigTargetSettings(void)
{
JLINK_SYS_Report("[ConfigTargetSettings]");
JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
JLINK_CORESIGHT_IndexAHBAPToUse = 0;
CPU=CORTEX_M4;
// force RESET to low
JTAG_ResetPin = 0; // issue a reset of the CPU
return 0;
}
/*
* InitTarget()
* - Replace the target-CPU-auto-find procedure of the J-Link DLL.
*
*/
int InitTarget(void)
{
JLINK_CORESIGHT_WriteAP(JLINK_CORESIGHT_AP_REG_ADDR, 0xE000EDFC);
JLINK_CORESIGHT_WriteAP(JLINK_CORESIGHT_AP_REG_DATA, 0x01000001);
// release RESET
JTAG_ResetPin = 1;
return 0;
}