Forums - JTAG not flashing

4 posts / 0 new
Last post
JTAG not flashing
mair.swartz
Join Date: 26 Oct 20
Posts: 2
Posted: Mon, 2020-10-26 21:26

Hi,

I am trying to set up a new QCA4020. I am following the document on https://developer.qualcomm.com/project/hello-world-w-qca4020-dev-kit

When I try to flash after setting up the jumpers I get an error 

File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 234, in _check_status

    f = open(self.cmd_status_file , 'rb')
IOError: [Errno 2] No such file or directory: 'gdbout/command_result.log'
[2020-10-27 15:02:12,836] WARNING: The last command return error
 File:flash_through_gdb.py:244 Function:_check_status 
[2020-10-27 15:02:12,836] ERROR: Failed to write to start sector=0, num sectors=1 File:flash_through_gdb.py:663 Function:main 
 
(full output below)
I see this afterwards
Flash Operation Completed Successfully...
 

However after putting putty on I see its not running the program I expected. The only part of the instructions I could not follow was where it says

install OpenOCD version 0.10.0 [2017-06-09] which is available here

The issue is the specified version of OpenOCD does not appear to be in that link

Full output as follows

 

Open On-Chip Debugger 0.10.0 (2020-07-29) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
DEPRECATED! use 'adapter driver' not 'interface'
DEPRECATED! use 'adapter speed' not 'adapter_khz'
qca402x_openocd.cfg:81: Error: target requires -dap parameter instead of -chain-position, see http://visualgdb.com/support/chainposition
in procedure 'script' 
at file "embedded:startup.tcl", line 26
at file "qca402x_openocd.cfg", line 81
Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\firmware_table.bin
Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_partition_table.xml
Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_fwd_table.xml
[2020-10-27 15:02:10,608] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:658 Function:gen_xml_program 
[2020-10-27 15:02:10,614] INFO: Done Generating XML file to program. File:gen_fwd_table.py:696 Function:gen_xml_program 
Starting GDB Server....
[2020-10-27 15:02:10,700] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:581 Function:main 
[2020-10-27 15:02:10,734] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:613 Function:main 
[2020-10-27 15:02:10,734] DEBUG: Search Path 1 .\output/ File:flash_through_gdb.py:625 Function:main 
[2020-10-27 15:02:10,734] DEBUG: Search Path 2 ..\..\..\..\..\bin\cortex-m0\threadx\ File:flash_through_gdb.py:625 Function:main 
[2020-10-27 15:02:10,734] DEBUG: Search Path 3 ..\..\..\..\..\bin\wlan/ File:flash_through_gdb.py:625 Function:main 
[2020-10-27 15:02:10,734] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:625 Function:main 
[2020-10-27 15:02:10,737] INFO: Will write file ./firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:660 Function:main 
[2020-10-27 15:02:10,739] DEBUG: C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/arm-none-eabi-gdb.exe --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 Function:run 
GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
[2020-10-27 15:02:10,773] INFO: GDB can run without shell=true File:flash_through_gdb.py:420 Function:_check_need_shell 
gdbout/gdb_commands.txt:1: Error in sourced command file:
localhost:3333: No connection could be made because the target machine actively refused it.
[2020-10-27 15:02:12,835] ERROR: Unable to open the file 'gdbout/command_result.log'
 File:flash_through_gdb.py:241 Function:_check_status 
Traceback (most recent call last):
  File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 234, in _check_status
    f = open(self.cmd_status_file , 'rb')
IOError: [Errno 2] No such file or directory: 'gdbout/command_result.log'
[2020-10-27 15:02:12,836] WARNING: The last command return error
 File:flash_through_gdb.py:244 Function:_check_status 
[2020-10-27 15:02:12,836] ERROR: Failed to write to start sector=0, num sectors=1 File:flash_through_gdb.py:663 Function:main 
Flash Operation Completed Successfully...
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2020-10-26 22:29

Download OpenOCD version 0.10.0 [2017-06-09]  from below link:
https://drive.google.com/file/d/1VAogN9G3CGf9AoStPI9wuKczh_b_dvML/view

As per OpenOCD team, they cant archive all the older release versions.

  • Up0
  • Down0
mair.swartz
Join Date: 26 Oct 20
Posts: 2
Posted: Tue, 2020-10-27 20:01

Thanks Raja,

I have downloaded the recommended OpenOcd version in the provided link. I have changed my environment variable path to include the bin folder.

I have also ensured the debug configuration in eclipse is pointing to the right path.

Now when I try to flash the dev board, I get the error below

Just to confirm I have updated the FTDI driver using zadiq as well. still no luck

 

Error ouput...

Open On-Chip Debugger 0.10.0 (2017-06-09) [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

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED

Info : clock speed 5000 kHz

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Error: Trying to use configured scan chain anyway...

Error: QM4.cpu: IR capture error; saw 0x0f not 0x01

Warn : Bypassing JTAG setup events due to errors

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Could not initialize the debug port

Error: JTAG scan chain interrogation failed: all ones

Error: Check JTAG interface, timings, target power, etc.

Error: Trying to use configured scan chain anyway...

Error: QM4.cpu: IR capture error; saw 0x0f not 0x01

Warn : Bypassing JTAG setup events due to errors

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Invalid ACK (3) in DAP response

Error: Could not initialize the debug port

Error: Target not examined, reset NOT asserted!

in procedure 'reset' called at file "qca402x_openocd.cfg", line 93

in procedure 'ocd_bouncer'

 

 

Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\firmware_table.bin

Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_partition_table.xml

Could Not Find C:\qualcom\qca4020\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_fwd_table.xml

[2020-10-28 10:52:50,746] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:658 Function:gen_xml_program 

[2020-10-28 10:52:50,750] INFO: Done Generating XML file to program. File:gen_fwd_table.py:696 Function:gen_xml_program 

Starting GDB Server....

[2020-10-28 10:52:50,818] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:581 Function:main 

[2020-10-28 10:52:50,846] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:613 Function:main 

[2020-10-28 10:52:50,848] DEBUG: Search Path 1 .\output/ File:flash_through_gdb.py:625 Function:main 

[2020-10-28 10:52:50,848] DEBUG: Search Path 2 ..\..\..\..\..\bin\cortex-m0\threadx\ File:flash_through_gdb.py:625 Function:main 

[2020-10-28 10:52:50,848] DEBUG: Search Path 3 ..\..\..\..\..\bin\wlan/ File:flash_through_gdb.py:625 Function:main 

[2020-10-28 10:52:50,848] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:625 Function:main 

[2020-10-28 10:52:50,851] INFO: Will write file ./firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:660 Function:main 

[2020-10-28 10:52:50,851] DEBUG: C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/arm-none-eabi-gdb.exe --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 Function:run 

GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git

Copyright (C) 2017 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word".

[2020-10-28 10:52:50,885] INFO: GDB can run without shell=true File:flash_through_gdb.py:420 Function:_check_need_shell 

gdbout/gdb_commands.txt:1: Error in sourced command file:

localhost:3333: No connection could be made because the target machine actively refused it.

[2020-10-28 10:52:52,989] ERROR: Unable to open the file 'gdbout/command_result.log'

 File:flash_through_gdb.py:241 Function:_check_status 

Traceback (most recent call last):

  File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 234, in _check_status

    f = open(self.cmd_status_file , 'rb')

IOError: [Errno 2] No such file or directory: 'gdbout/command_result.log'

[2020-10-28 10:52:52,990] WARNING: The last command return error

 File:flash_through_gdb.py:244 Function:_check_status 

[2020-10-28 10:52:52,990] ERROR: Failed to write to start sector=0, num sectors=1 File:flash_through_gdb.py:663 Function:main 

Flash Operation Completed Successfully...

 

 

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2020-11-09 13:44

The device still shows error to find FTDI device:

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED

 

Kindly make sure you have followed instructions listed under QCA402x (CDB2x) Development Kit User Guide 80-YA121-140 document:
Section 2.6.1 Flash the image using JTAG
Section 2.7.2.1 Install FTDI driver for JTAG

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