Forums - J-Link Debugging

7 posts / 0 new
Last post
J-Link Debugging
andreas
Join Date: 21 Oct 19
Posts: 13
Posted: Fri, 2019-11-08 05:19

Hi,

does anyone have instructions on how to set-up Eclipse for J-Link debugging? Especially the support to flash the image is needed. I found some batch files in the SDK that at least seem to support a J-Link setup, but currently it does not work for me.

Thanks and best regards

Andreas

  • Up0
  • Down0
raja_pedada
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 211
Posted: Mon, 2019-11-11 18:40
Below jumper connections are required to configure for J-Link debugging:
 
QCA4020 J37-pin3 to JLink Pin9  (JTAG TCK)
QCA4020 J38-pin3 to JLink Pin13 (JTAG TDI)
QCA4020 J40-pin3 to JLink Pin7  (JTAG TMS)
QCA4020 J39-pin3 to JLink Pin5  (JTAG TDO)
QCA4020 J1 -pin4 to JLink Pin1  (VREF)
QCA4020 J33-pin1 to JLink Pin3  (TRST)
JTAG GPIO bootstrap: (Insert Jumper J30 Pin1-2 and jumper at J31 1-2 for JTAG debug mode)
 
 
Execute "debug.bat m4" command to start debugging using J-Link.
  • Up0
  • Down0
raja_pedada
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 211
Posted: Mon, 2019-11-11 18:41

*QCA4020 J33-pin1 to JLink Pin3  (TRST)

Kindly note QCA4020 J33-pin1 should be connected to J-Link Pin3 (TRST)

  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 13
Posted: Tue, 2019-11-12 07:24

Thanks for the setup information. I can confirm that I did that already correctly. If I follow your advice the batch file complains about this file, which I can not find somewhere in the SDK: Quartz.JLinkScript

I had some progress with this topic. I am now able to download the SW via J-Link with the corresponding batch file. When debugging I can also connect to the board, but I can not run the SW correctly from the debugger. It stays always in this part of the code:

sbl1_main_ctl() at sbl1_mc.c:355 0x100a05be    


If I let the board run freely and attach to the board with J-Link while running, I am able to pause the execution, set a breakpoint and debug. Currently the main issue seems to be the start-up phase, when the board waits for the JTAG connection and then the boot-loader phase is being executed. I guess maybe the ELF file has not been loaded or something similar?

Thanks Andreas

  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 13
Posted: Thu, 2019-11-21 06:09

No one out there who has this running?

  • Up0
  • Down0
raja_pedada
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 211
Posted: Thu, 2019-11-21 12:56
sbl1_main_ctl() is the Main Controller which calls MissionROM, stack canary init, Configure, authenticate XIP and Transfer execution to SBL_XIP.
 
In my case I tried to use default QCLI_demo with sleep disable for JTAG and could observe as below on Console prompt:
 
$ debug.bat m4
***************
Breakpoint 2 at 0x100a0132: file /local/mnt/....ioesw_proc/core/boot/sbl//sbl1_mc.c, line 345.
Breakpoint 3 at 0x10fbc: file /local/mnt/....ioesw_proc/core/v2/rom/drivers/debugtools/err/src/apps_proc/arm//err_jettison_core_m4.s, line 83.
(gdb) b app_init
Breakpoint 4 at 0x10047170: file ..\..\src\qcli\pal.c, line 457.
(gdb) b app_start
Breakpoint 5 at 0x10047238: file ..\..\src\qcli\pal.c, line 496.
(gdb) b enable_wlan
Breakpoint 6 at 0x10048000: file ..\..\src\wifi\wifi_cmd_handler.c, line 379.
(gdb) c
Continuing.
 
Breakpoint 4, app_init (ColdBoot=0x1) at ..\..\src\qcli\pal.c:457
457     {
(gdb) c
Continuing.
 
Breakpoint 5, app_start (ColdBoot=0x1) at ..\..\src\qcli\pal.c:496
496     {
(gdb) c
Continuing.
 
Breakpoint 6, enable_wlan () at ..\..\src\wifi\wifi_cmd_handler.c:379
379     {
(gdb)

Can you try to delete breakpoint 2 which is "sbl1_main_ctl" and confirm if its still an issue after bootup ?
  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 13
Posted: Mon, 2019-11-25 02:11

Hi,

as mentioned above, when executing: debug.bat m4

it complains that the the J-Link script file:    Quartz.JLinkScript   can not be found.

I can not find it anywhere in the SDK. What is the content of this file and how is the J-Link  configured?

Thanks, Andreas

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.