Author Topic: JLink script for bcm2837  (Read 604 times)

0 Members and 1 Guest are viewing this topic.

Offline dobsonr741Topic starter

  • Frequent Contributor
  • **
  • Posts: 674
  • Country: us
JLink script for bcm2837
« on: March 29, 2024, 03:16:39 pm »
I wonder if anyone mastered connecting to bcm2837 with JLink and the Segger provided tools? OpenOCD can and does connecting fine using Link hardware. However, I want to use RTT, and that needs the native Sagger tooling. So I tried a few variations of jscript, attempting to configure CTI and debug base with no success.

Code: [Select]
JLINK_CORESIGHT_CoreBaseAddr    = 0x80000000;           
JLINK_ExecCommand("CORESIGHT_SetCSCTICoreBaseAddr=0x80018000");

It all ends up in:

Code: [Select]
No AP map specified by user. Setting auto-detected AP map.
DebugRegs + CTI manually specified. ROM table scan skipped.
Failed to identify core.

****** Error: Debug registers of core not found. Debugging not possible
Could not determine core debug registers + core CTI. Debugging not possible

The addresses are well know by OpenOCD, what is a working translation of them into Segger dialect?

Code: [Select]
set _DBGBASE {0x80010000 0x80012000 0x80014000 0x80016000}
set _CTIBASE {0x80018000 0x80019000 0x8001a000 0x8001b000}


 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 280
  • Country: nl
Re: JLink script for bcm2837
« Reply #1 on: March 31, 2024, 03:55:51 pm »
I don't know how to make it work with Segger's software, if it is RTT you are after, it is supported by recent versions of OpenOCD.
 

Online __george__

  • Newbie
  • Posts: 5
  • Country: no
Re: JLink script for bcm2837
« Reply #2 on: April 01, 2024, 09:09:36 pm »
It's a long time since I wrote a JLink script but I do remember that I had to oveload an initialization function for it to work. Searching a bit on github seems to confirm what I remember:
https://github.com/kamejoko80/my_osek/blob/6dcf8a748e1d3b9b43ddcc94c077d3cd970b0d7e/NEO_M4_OSEK/tool/IMX6SX_WITH_JLINK_V1.0/IMX6SX_HOW_TO_DEBUG_CORE_M4.txt#L71

But from your error message it seems that if you manually add the API as the github code shows you should go at least one step further.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf