Hello! I am currently configuring support for debugging an Cortex-A53 core through Ozone.
Here is some quick info about my enviornment.
I am using the JLink Plus Compact. Firmware is V10. Hardware is V10.10
Ozone 3.26h
The issue I am running into currently is that Ozone doesn't halt the CPU so the debugger can attach. When I attempt to run my configuration. A Popup window pops up that says this.
---------------------------
J-Link V7.66f Error
---------------------------
CPU_HW_Halt(): Function pointer is NULL
---------------------------
If anyone has run into this before or knows how to set the CPU_HW_HALT() function. I would greatly appreciate any feedback. I believe if I can configure halting the debugger will be able to connect.
Here is a look at the output when I run my jlinkscript.
Display All
Here is a look at my jlinkscript
Display All
Here is some quick info about my enviornment.
I am using the JLink Plus Compact. Firmware is V10. Hardware is V10.10
Ozone 3.26h
The issue I am running into currently is that Ozone doesn't halt the CPU so the debugger can attach. When I attempt to run my configuration. A Popup window pops up that says this.
---------------------------
J-Link V7.66f Error
---------------------------
CPU_HW_Halt(): Function pointer is NULL
---------------------------
If anyone has run into this before or knows how to set the CPU_HW_HALT() function. I would greatly appreciate any feedback. I believe if I can configure halting the debugger will be able to connect.
Here is a look at the output when I run my jlinkscript.
Source Code
- Device "CORTEX-A53" selected.
- ConfigTargetSettings() start
- XXXXXXXXXX Configuring settings
- X SetEtmBaseAddr was successful
- X SetCoreBaseAddr was successful
- XXXXXXXXXX Val, 0x00000000
- ConfigTargetSettings() end
- InitTarget() start
- XXXXXXXXXX Setup Target
- Memory access: CPU temp. halted: https://wiki.segger.com/Memory_accesses#Legacy_stop_mode
- InitTarget() end
- Connect failed. Resetting via Reset pin and trying again.
- ConfigTargetSettings() start
- XXXXXXXXXX Configuring settings
- X SetEtmBaseAddr was successful
- X SetCoreBaseAddr was successful
- XXXXXXXXXX Val, 0x00000000
- ConfigTargetSettings() end
- InitTarget() start
- XXXXXXXXXX Setup Target
- HDE Lock: 0xFFFFFFFF
- A53_DBG_0 Lock: 0xFFFFFFFF
- InitTarget() end
- TotalIRLen = 16, IRPrint = 0x000411
- JTAG chain detection found 2 devices:
- #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
- #1 Id: 0x14711093, IRLen: 12, Unknown device
- DPv0 detected
- AP map detection skipped. Manually configured AP map found.
- AP[0]: AXI-AP (IDR: Not set)
- AP[1]: APB-AP (IDR: Not set)
- AP[2]: JTAG-AP (IDR: Not set)
- Using preconfigured AP[1] as APB-AP
- AP[1]: APB-AP found
- DebugRegs + CTI manually specified. ROM table scan skipped.
- Cortex-A53 @ 0x80410000 (configured)
- CoreCTI @ 0x80420000 (configured)
- Debug architecture: ARMv8
- 6 code breakpoints, 4 data breakpoints
- Processor features:
- EL0 support: AArch64 + AArch32
- EL1 support: AArch64 + AArch32
- EL2 support: AArch64 + AArch32
- EL3 support: AArch64 + AArch32
- FPU support: Single + Double + Conversion
- ARMv8-A/R: The connected J-Link (S/N 850100973) uses an old firmware module V0 with known problems / limitations.
- Add. info (CPU temp. halted)
- CPU could not be halted
- Failed to temporarily halt CPU
- Specific core setup failed.
Here is a look at my jlinkscript
C Source Code: a53_0 jlinkscript
- // Run variables
- __constant U32 _USE_CORRECT_DBG_ADDR = 1;
- __constant U32 _USE_JTAG_SETUP = 0;
- // Target Variables
- __constant U32 _ADDR_DBG = 0x80410000;
- __constant U32 _ADDR_DBG_ROM = 0x80400000;
- __constant U32 _INDEX_AP = 1;
- __constant U32 _EDEC_OFFSET = 0x24; // External Debug Execution Control Register
- __constant U32 _LAR_OFFSET = 0xFB0;
- __constant U32 _LSR_OFFSET = 0xFB4;
- __constant U32 _CONTROL_OFFSET = 0x88; // CORESIGHT_SOC_TSGEN
- __constant U32 _CNTCR = 0x00FE900000; // Halt the counter based on state of primary input. Halt on Debug
- __constant U32 _CNTCR_HDBG_ON = 0x100;
- __constant U32 _EDESR = 0x00FEC10020; // External Debug Event Status Register
- __constant U32 _EDESR_HALT = 0x100;
- // DAP variables
- __constant U32 _DP_CTRL_STAT_BIT_DBGPWRUPREQ = (1 << 30);
- __constant U32 _DP_CTRL_STAT_BIT_SYSPWRUPREQ = (1 << 28);
- __constant U32 _DP_CTRL_STAT_BIT_STICKYERR = (1 << 5);
- int ConfigTargetSettings( void ){
- JLINK_SYS_Report("XXXXXXXXXX Configuring settings");
- JLINK_ExecCommand("EnableRemarks");
- if(JLINK_ExecCommand("CORESIGHT_SetETMBaseAddr = 0x80440000 ForceUnlock = 1 APIndex = 1") == 0)
- {
- JLINK_SYS_Report("X SetEtmBaseAddr was successful");
- }
- JLINK_CORESIGHT_AddAP(0, CORESIGHT_CUSTOM_AP);
- JLINK_CORESIGHT_AddAP(1, CORESIGHT_APB_AP);
- JLINK_CORESIGHT_AddAP(2, CORESIGHT_JTAG_AP);
- CPU = CORTEX_A53;
- JLINK_CORESIGHT_IndexAPBAPToUse = _INDEX_AP;
- CORESIGHT_CoreBaseAddr = _ADDR_DBG;
- JLINK_ExecCommand("CORESIGHT_SetCSCTICoreBaseAddr=0x80420000");
- JLINK_SYS_Report1("XXXXXXXXXX Val, ", CORESIGHT_CoreBaseAddr);
- return 0;
- }
- int InitTarget(void)
- {
- JTAG_Reset();
- JTAG_DRPre = 0;
- JTAG_DRPost = 1;
- JTAG_IRPre = 0;
- JTAG_IRPost = 12;
- JTAG_IRLen = 4;
- JTAG_AllowTAPReset = 1;
- return 0;
- }
- int SetupTarget( void ){
- U32 A53_DBG_0;
- U32 LOCK_STATUS;
- U32 HDE_INSERT;
- U32 HALT_INSERT;
- JLINK_ExecCommand("EnableRemarks");
- JLINK_SYS_Report("XXXXXXXXXX Setup Target");
- A53_DBG_0 = 0x00FEC10000;
- // Unlock the Lock access register
- JLINK_MEM_WriteU32(A53_DBG_0 + _LAR_OFFSET, 0xC5ACCE55);
- // Write acces into External Debug Status and Control Register
- HDE_INSERT = JLINK_MEM_ReadU32(A53_DBG_0 + _CONTROL_OFFSET);
- HDE_INSERT = HDE_INSERT | (1 << 14);
- JLINK_MEM_WriteU32(A53_DBG_0 + _CONTROL_OFFSET, HDE_INSERT);
- JLINK_SYS_Report1("HDE Lock: ", HDE_INSERT);
- // Read value
- LOCK_STATUS = JLINK_MEM_ReadU32(A53_DBG_0 + _LSR_OFFSET);
- JLINK_SYS_Report1("A53_DBG_0 Lock: ", LOCK_STATUS);
- //Manually HALT?
- JLINK_MEM_WriteU32(_EDESR, _EDESR_HALT);
- return 0;
- }
The post was edited 1 time, last by jordanmuehl0001 ().