Forums - JTAG on CDB20

5 posts / 0 new
Last post
JTAG on CDB20
gabe
Join Date: 11 May 18
Posts: 7
Posted: Wed, 2018-06-13 23:58

Hi, I'm new to the openocd system, I'm hoping you can help me get up and running. I am so far unable to get openocd to work on my cdb20 dev board. This is the message I see:

uild/gcc$ openocd -f qca402x_openocd.cfg 
Open On-Chip Debugger 0.7.0 (2013-10-22-08:31)
Licensed under GNU GPL v2
For bug reports, read
Info : only one transport option; autoselect 'jtag'
adapter speed: 5000 kHz
Info : clock speed 5000 kHz
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Warn : Unexpected idcode after end of chain: 32 0x300160e1
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction
Polling target QM4.cpu failed, GDB will be halted. Polling again in 100ms
Polling target QM4.cpu failed, GDB will be halted. Polling again in 300ms
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Warn : Unexpected idcode after end of chain: 32 0x300160e1
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction
Error: Target not examined yet
 
 
Runtime Error: qca402x_openocd.cfg:73: 
in procedure 'script' 
at file "embedded:startup.tcl", line 58
in procedure 'reset' called at file "qca402x_openocd.cfg", line 73
 
 
I am just trying to start the openocd server so I can start a debug session.
 
  • Up0
  • Down0
jbhanu Moderator
Join Date: 6 Feb 17
Posts: 80
Posted: Thu, 2018-06-14 03:29

I see you are trying to debug via openocd.Do you able to flash image via openocd ? 

Means using flash_openocd.bat or flash_openocd.sh in linux or windows. 

 

Regards

Jyotiranjan 

  • Up0
  • Down0
gabe
Join Date: 11 May 18
Posts: 7
Posted: Thu, 2018-06-14 10:58

I haven't been able to get that working either - I assumed it was failing because jtag was failing as I showed above. I am using the provided cfg files from the SDK:

 

kartik@ubuntu:~/qcom/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ ./flash_openocd.sh 
Open On-Chip Debugger 0.7.0 (2013-10-22-08:31)
Licensed under GNU GPL v2
For bug reports, read
Info : only one transport option; autoselect 'jtag'
adapter speed: 5000 kHz
Info : clock speed 5000 kHz
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Warn : Unexpected idcode after end of chain: 32 0x300160e1
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction
Polling target QM4.cpu failed, GDB will be halted. Polling again in 100ms
Polling target QM4.cpu failed, GDB will be halted. Polling again in 300ms
Info : JTAG tap: QM4.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Warn : Unexpected idcode after end of chain: 32 0x300160e1
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction
Error: Target not examined yet
 
 
Runtime Error: qca402x_openocd.cfg:73: 
in procedure 'script' 
at file "embedded:startup.tcl", line 58
in procedure 'reset' called at file "qca402x_openocd.cfg", line 73
[2018-06-14 10:55:00,355] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:654 Function:gen_xml_program 
[2018-06-14 10:55:00,357] INFO: Done Generating XML file to program. File:gen_fwd_table.py:692 Function:gen_xml_program 
[2018-06-14 10:55:00,400] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:577 Function:main 
[2018-06-14 10:55:00,411] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:609 Function:main 
[2018-06-14 10:55:00,411] DEBUG: Search Path 1 /home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc/output/ File:flash_through_gdb.py:621 Function:main 
[2018-06-14 10:55:00,411] DEBUG: Search Path 2 /home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/bin/cortex-m0/threadx/ File:flash_through_gdb.py:621 Function:main 
[2018-06-14 10:55:00,411] DEBUG: Search Path 3 /home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/bin/wlan/ File:flash_through_gdb.py:621 Function:main 
[2018-06-14 10:55:00,411] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:621 Function:main 
[2018-06-14 10:55:00,412] ERROR: The file firmware_table.bin is found in two places /home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin and ./firmware_table.bin, using the first File:flash_through_gdb.py:60 Function:search_for_file 
[2018-06-14 10:55:00,412] INFO: Will write file /home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:656 Function:main 
[2018-06-14 10:55:00,413] DEBUG: /usr/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:432 Function:run 
[2018-06-14 10:55:00,415] INFO: GDB may require shell=true, will try on shell mode File:flash_through_gdb.py:418 Function:_check_need_shell 
gdbout/gdb_commands.txt:1: Error in sourced command file:
localhost:3333: Connection timed out.
[2018-06-14 10:55:12,845] ERROR: Unable to open the file 'gdbout/command_result.log'
 File:flash_through_gdb.py:237 Function:_check_status 
Traceback (most recent call last):
  File "/home/kartik/qcom/QCA4020.OR.1.1_PostCS1/target/build/tools/flash/flash_through_gdb.py", line 230, in _check_status
    f = open(self.cmd_status_file , 'rb')
IOError: [Errno 2] No such file or directory: 'gdbout/command_result.log'
[2018-06-14 10:55:12,846] WARNING: The last command return error
 File:flash_through_gdb.py:240 Function:_check_status 
[2018-06-14 10:55:12,846] ERROR: Failed to write to start sector=0, num sectors=1 File:flash_through_gdb.py:659 Function:main 
Abort flash.sh: flash_through_gdb.py failed
Terminated
kartik@ubuntu:~/qcom/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ 
 
  • Up0
  • Down0
gabe
Join Date: 11 May 18
Posts: 7
Posted: Thu, 2018-06-14 13:54

I tried flashing through USB on a windows system and ran into issues there too, I feel like I must be missing some critical configuration step. On windows, I see the EDL device in device manager (COMM15), it gives a warning that the driver isn't signed, but I think it is still working, but when I try to flash I see the following:

 

C:\qcom\qca4020.or_.1.1_postcs1\QCA4020.OR.1.1_PostCS1\target\quartz\demo\Hellow
orld_demo\build\gcc>python ..\..\..\..\..\build\tools\flash\qflash.py --comm 15
qflash.py Info: Generate partition table...
qflash.py Info: Generate FWD table...
[2018-06-14 13:38:15,482] INFO: Checking for files to add to the image for Firmw
are Descriptor Table 0 File:gen_fwd_table.py:654 Function:gen_xml_program
[2018-06-14 13:38:15,497] INFO: Done Generating XML file to program. File:gen_fw
d_table.py:692 Function:gen_xml_program
qflash.py Info: Download device programmer...
qflash.py Info: Check for QDLoader port in Device Manager.
qflash.py Info: Need to reset device?
qflash.py Error: QSaharaServer failed to load Device Programmer.
 
C:\qcom\qca4020.or_.1.1_postcs1\QCA4020.OR.1.1_PostCS1\target\quartz\demo\Hellow
orld_demo\build\gcc>
  • Up0
  • Down0
Re: JTAG on CDB20 Best Answer
jbhanu Moderator
Join Date: 6 Feb 17
Posts: 80
Posted: Thu, 2018-06-14 22:15

Hi , 

Regarding JTAG , have you insatlled FTDI driver. Please follow below section of UG .Also insatall openocd. 

3.7.2.1 Install FTDI driver for JTAG

For USB , just plug out the USB cable and plug in once and try. It should work. Means just powrcycle the device. 

Thanks 

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