Forums - Debugger cannot read Breakpoint error please help!

4 posts / 0 new
Last post
Debugger cannot read Breakpoint error please help!
gdutka
Join Date: 21 Jun 19
Posts: 7
Posted: Mon, 2019-07-01 12:10

Hello all, 

 I've been trying to bring up the QCA4020 development board by trying to flash and debug several of the demo applications. By following the "qualcom sdk startup guide" I found in the Docs and tools page, I managed to succesfully flash and run the helloworld application and the QCLI_Demo application. All is fine until I try to run the debugger through the commandline or even eclipse. When attempting to debug I receive the following error: 

I should note that I am debugging using two terminals like it was specified in the startup guide. The terminal running arm-non-eabi-gdb displays the following: 

<blockquote>

Breakpoint 2 at 0x100a0172: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/boot/sbl//sbl1_mc.c, line 344.

Breakpoint 3 at 0x10fbc: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.1.0.r4-00013-QZFPGA-1_20170509_214818/b/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 0x10046468: file ..\..\src\pal\pal.c, line 194.
(gdb) b app_start
Breakpoint 5 at 0x100463f0: file ..\..\src\pal\pal.c, line 217.
(gdb) c
Continuing.

 

Invalid ACK (7) in DAP response

</blockquote>

The other terminal where the "openocd -f QCA402x_cfg.cfg " command was run displays the following.

<blockquote>

Error: JTAG-DP STICKY ERROR
Error: Failed to write memory at 0x00010fbe
Error: can't add breakpoint: unknown reason
Error: Invalid ACK (7) in DAP response
Warn : target QM4.cpu is not halted (gdb fileio)
Polling target QM4.cpu failed, trying to reexamine
Error: Debug regions are unpowered, an unexpected reset might have happened
Error: JTAG-DP STICKY ERROR
Info : QM4.cpu: hardware has 6 breakpoints, 4 watchpoints

 

Info : QM4.cpu: external reset detected

</blockquote>

 

I am unsure as to why I am getting this error despite running through all the instructions in the startup guide. I wanted to point out that I disabled the sleep driver in the export directory prior to building and debugging. I am using the version 20160925 of OpenOCD and vresion 6 2017-q2-update of GNU tools for arm embedded. I double checked all the jumpers. I think the problem isnt with the jumpers if not I would not have been able to flash the target. 

 

One more thing. I had to make a small edit to the qca402x_cfg file since there are some compatibility issues with openOCD. The qca402x_cfg file has beed changed to the following: 

<blockquote>

interface ftdi
 
# The vendor ID and Product ID of the adapter
ftdi_vid_pid 0x0403 0x6010
 
# The USB Device description
# ftdi_device_desc "FT2232C Dual USB-UART/FIFO IC"
 
# Select the Channel of the FTDI device to use for MPSSE operations
ftdi_channel 0
 
# The initial values of the FTDI GPIO data and direction registers
ftdi_layout_init 0x0008 0x00fb
 
 
 
transport select jtag
 
adapter_khz 5000
 
set CHIPNAME QM4
set TAPTYPE cpu
set IRLEN 4
set CPUTAPID 0x4ba00477
#
# Qualcomm Quartz 402x target device
#
 
if { [info exists TAPTYPE] } {
    set _TAPTYPE $TAPTYPE
} else {
    set _TAPTYPE cpu
}
 
if { [info exists CHIPNAME] } {
    set _CHIPNAME $CHIPNAME
} else {
    set _CHIPNAME quartzM4
}
 
if { [info exists CPUTAPID] } {
    set _CPUTAPID $CPUTAPID
} else {
    set _CPUTAPID 0x4ba00477
}
 
if { [info exists IRLEN] } {
    set _IRLEN $IRLEN
} else {
    set _IRLEN 4
}
 
jtag newtap $_CHIPNAME $_TAPTYPE -irlen $_IRLEN -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.$_TAPTYPE
#target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
dap create qcatarget -chain-position $_TARGETNAME
target create $_TARGETNAME cortex_m -dap qcatarget
 
$_TARGETNAME configure -endian little
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x1000 -work-area-backup 0
 
# Select the Quartz M4 CPU as the current target
targets QM4.cpu
 
init
 
reset halt
 
targets

 

 

</blockquote>

Please any help with this would be very much appreciated. I cannot continue with development I do not have access to a debugger. 

 

Thanks, 

Gian

  • Up0
  • Down0
mon2
Profile picture
Join Date: 11 Jun 19
Location: Windsor, Ontario
Posts: 3
Posted: Mon, 2019-07-01 16:09

Hi Gian.

Disclaimer: New at this and still struggling to set up the toolchain and failing as of this writing but...

Do you have BOTH USB cables attached to your kit? This is mandatory to work correctly. One USB cable is for the FTDI interface and the other believe is for the module and both cables are required to be plugged to your box.

Please post back if this helps.

Here is what we see on our box:

SUCCESS: The process "openocd.exe" with PID 3900 has been terminated.
Open On-Chip Debugger 0.10.0 (2017-08-21) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
Info : clock speed 5000 kHz
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 11 -expected-id 0x300160e1"
Info : QM4.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : JTAG tap: auto0.tap tap/device found: 0x300160e1 (mfg: 0x070 (Qualcomm), part: 0x0016, ver: 0x3)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.

and so on for the gibberish...

We are fighting some other OpenOCD demons on setup:

Could Not Find E:\Users\silex\QCA4020.OR.3.0_00011.1\target\quartz\demo\QCLI_demo\build\gcc\output\firmware_table.bin
Could Not Find E:\Users\silex\QCA4020.OR.3.0_00011.1\target\quartz\demo\QCLI_demo\build\gcc\output\generated_partition_table.xml
Could Not Find E:\Users\silex\QCA4020.OR.3.0_00011.1\target\quartz\demo\QCLI_demo\build\gcc\output\generated_fwd_table.xml
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000001c0 msp: 0x10000154
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* QM4.cpu            cortex_m   little QM4.cpu            halted
[2019-07-01 19:01:05,428] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:673 Function:gen_xml_program
[2019-07-01 19:01:05,428] INFO: Done Generating XML file to program. File:gen_fwd_table.py:711 Function:gen_xml_program
Starting GDB Server....
[2019-07-01 19:01:05,499] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:596 Function:main
[2019-07-01 19:01:05,559] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:628 Function:main
[2019-07-01 19:01:05,559] DEBUG: Search Path 1 .\output/ File:flash_through_gdb.py:640 Function:main
[2019-07-01 19:01:05,559] DEBUG: Search Path 2 ..\..\..\..\..\bin\cortex-m0\threadx\ File:flash_through_gdb.py:640 Function:main

 

 

  • Up0
  • Down0
mon2
Profile picture
Join Date: 11 Jun 19
Location: Windsor, Ontario
Posts: 3
Posted: Mon, 2019-07-01 20:25

Review this thread:

https://developer.qualcomm.com/forum/qdn-forums/hardware/qca4020-qca4024...

as your post shows:

Invalid ACK (7) in DAP response

and be sure that BOTH USB cables are mated with your kit.

  • Up0
  • Down0
gdutka
Join Date: 21 Jun 19
Posts: 7
Posted: Tue, 2019-07-02 09:28

Hello again, 

 I have figured out the Problem. The solution to this issue has been solved. Thank you for responses. To fix it I had to downgrade to versions 6.2 Q4 2016 for the GNU tools arm embedded devices. In addition it was also equally important to be using OpenOCD version 2017-08-21. Without these two versions running together the debugger will not work in the commandline.  In addition, I had to reverse the changes that I did to the qca402xcfg.cfg file so that it will work with OpenOCD. 

 

  • 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.