Dear Segger Experts,
Is it possible to specify the rom table address for an AP in the jlinkscript?
I have a case that a Cortex-R52 core is connected with the Debug Apb Bus and accessed in AP[0](The structure can be seen in the attached picture).
The rom table addess for the R52 is 0xE00A0000, but when using the Jlink to connect, it couldn't find the R52 tom table, just find the rom table addres (0x8000_0000)for debug apb.
My test jlinkscript is as the following:
---------------------------------------------------------------------------
void InitTarget(void) {
int v;
int Ctrl;
Report("******************************************************");
Report("J-Link script: R52. J-Link script");
Report("******************************************************");
CPU = 0x1404FFFF; // Pre-select that we have a Cortex-R52 (Wrong CPU type for CORTEX_R52 in the jlink script)
JTAG_AllowTAPReset = 0; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
//
// Power-up complete DAP
//
v = 0
| (1 << 30) // System power-up
| (1 << 28) // Debug popwer-up
| (1 << 5) // Clear STICKYERR
;
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_DP_REG_CTRL_STAT, 0, v);
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_DP_REG_SELECT, 0, (0 << 24) | (0 << 4)); // Select AP[0], bank 0
Ctrl = 0
| (2 << 0) // AP-access size. Fixed to 2: 32-bit
| (1 << 4) // Auto increment TAR after read/write access.
// After a successful Data Read/Write Register access, the address in the TAR is incremented by the size of the access.
| (1 << 31) // Enable software access to the Debug APB bus.
;
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_AP_REG_CTRL, 1, Ctrl);
JTAG_SetDeviceId(0, 0x6BA00477); // 4-bits IRLen
CORESIGHT_AddAP(0, CORESIGHT_APB_AP); // core R52
CORESIGHT_AddAP(1, CORESIGHT_AHB_AP);
CORESIGHT_AddAP(2, CORESIGHT_AHB_AP); // core M7_0
CORESIGHT_AddAP(3, CORESIGHT_AHB_AP); // core M7_1
CORESIGHT_IndexAPBAPToUse = 0; // Use AP[0] here to connect Cortex-R52
}
------------------------------------------------------------------
The jlink log is as the attached picture shows.
You could see the rom table address for AP[0] scanned by jlink is 0x8000_0000, not the 0xE00A0000.
So I wonder if there is a method to specify the rom table address to 0xE00A0000 in the jlink script when jlink scanning.
Many thanks in advance!
BR,
Gavin
Is it possible to specify the rom table address for an AP in the jlinkscript?
I have a case that a Cortex-R52 core is connected with the Debug Apb Bus and accessed in AP[0](The structure can be seen in the attached picture).
The rom table addess for the R52 is 0xE00A0000, but when using the Jlink to connect, it couldn't find the R52 tom table, just find the rom table addres (0x8000_0000)for debug apb.
My test jlinkscript is as the following:
---------------------------------------------------------------------------
void InitTarget(void) {
int v;
int Ctrl;
Report("******************************************************");
Report("J-Link script: R52. J-Link script");
Report("******************************************************");
CPU = 0x1404FFFF; // Pre-select that we have a Cortex-R52 (Wrong CPU type for CORTEX_R52 in the jlink script)
JTAG_AllowTAPReset = 0; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
//
// Power-up complete DAP
//
v = 0
| (1 << 30) // System power-up
| (1 << 28) // Debug popwer-up
| (1 << 5) // Clear STICKYERR
;
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_DP_REG_CTRL_STAT, 0, v);
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_DP_REG_SELECT, 0, (0 << 24) | (0 << 4)); // Select AP[0], bank 0
Ctrl = 0
| (2 << 0) // AP-access size. Fixed to 2: 32-bit
| (1 << 4) // Auto increment TAR after read/write access.
// After a successful Data Read/Write Register access, the address in the TAR is incremented by the size of the access.
| (1 << 31) // Enable software access to the Debug APB bus.
;
JLINK_CORESIGHT_WriteDAP(JLINK_CORESIGHT_AP_REG_CTRL, 1, Ctrl);
JTAG_SetDeviceId(0, 0x6BA00477); // 4-bits IRLen
CORESIGHT_AddAP(0, CORESIGHT_APB_AP); // core R52
CORESIGHT_AddAP(1, CORESIGHT_AHB_AP);
CORESIGHT_AddAP(2, CORESIGHT_AHB_AP); // core M7_0
CORESIGHT_AddAP(3, CORESIGHT_AHB_AP); // core M7_1
CORESIGHT_IndexAPBAPToUse = 0; // Use AP[0] here to connect Cortex-R52
}
------------------------------------------------------------------
The jlink log is as the attached picture shows.
You could see the rom table address for AP[0] scanned by jlink is 0x8000_0000, not the 0xE00A0000.
So I wonder if there is a method to specify the rom table address to 0xE00A0000 in the jlink script when jlink scanning.
Many thanks in advance!
BR,
Gavin
The post was edited 1 time, last by GavinLi5567 ().