Hi,
I'm trying to compile and install the Hello World demo program on a QCA4020 using a Linux PC host. I got the code to compile, but I get errors with the flash loader. When I try, it appears that the JTAG interface has failed. Here's what I see:
> sh flash_openocd.sh
[sudo] password for ...:
Open On-Chip Debugger 0.9.0 (2018-01-21-13:43)
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
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
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
...
I am running Debian Linux 9.8, with all the latest updates applied.
ARM toolchain is gcc-arm-none-eabi-8-2018-q4-major-linux-tar.bz2
Qualcomm SDK is qca4020.or_.3.0_00011.1.zip
OpenOCD is the latest from Debian - version 0.9.0-1+deb8u1
I set the jumpers according to the Hello World tutorial page (https://developer.qualcomm.com/project/hello-world-w-qca4020-dev-kit):
- J30 pins 1-2
- J31 pins 1-2
- J32 pins 1-2
- J37 pins 2-3
- J38 pin2 to J39 pin 3
- J38 pin3 to J39 pin 2
I tried the same procedure using Ubuntu 18.04 LTS running in a VirtualBox VM on Windows 10, but got the same results.
What am I missing here? Any help would be most appreciated
-- David
I just tried compiling OpenOCD verson 0.10. It still fails, but with more verbose messages (because I enabled verbose messags):
So I don't think it's due to an outdated version of OpenOCD.
-- David
Apologies for the confusion in the jumper settings,
From the provided information, we could observer one of the jumper connections is missing.
Kindly connect the jumper settings as below and let us now if you still face issue while flashing the images ?
J30 pins 1-2
J31 pins 1-2
J32 pins 1-2
J37 pins 2-3
J40 pins 2-3 ***
J38 pin2 to J39 pin 3
J38 pin3 to J39 pin 2
Thanks. I also discovered that the original instructions omitted the pins on J40. I installed that jumper, but there is still no JTAG connectivity.
we have verified openOCD jtag setup on Ubuntu 18.04.
Kindly use openocd from http://gnutoolchains.com/arm-eabi/openocd/ and use version OpenOCD-20170609 and let us know if you still face the same issue.
That link is for Windows software (and version 20170609 is not available there).
version 0.10.0 was released on January 22, 2017. I have tested with it both on Debian and on Ubuntu 18.04 (in a VM).
The head-of-line branch ("master") doesn't work with our scripts - it produces an error:
I would like to try version 20170609, but I don't know how to get the sources for that version, since the git repo doesn't have a tag for that date and the link you provided only provides Windows binaries.
Is there a tutorial file somewhere that describes how to set up a working development environment on Linux? The only link to the Hello World app I could find (above) is for Windows, so it is likely that I did something wrong when I tried to adapt those instructions to my Linux environment.
I just finished installing the toolchain on Windows and I'm seeing the same problem. When I try to flash the board, I see the following:
I could not download OpenOCD version 2017-06-09, because it's no longer available. I used the 2017-08-21 release.
I am bothered by the error that libusb_open() failed. I followed the instructions and used Zadig to install the WinUSB driver on the "Dual RS232-HS (Interface 0)" device. Was that not correct, perhaps?
I think I found the low-level JTAG problem. My laptop doesn't provide enough current on its USB port.
It is necessary to attach the power brick to J6 in addition to the USB cable to the computer at J85. The symptom of this situation is a blinking power light (instead of it being bright and steady). You may want to update the tutorial page to explicitly mention this. I didn't see this explicitly documented anywhere and assumed that the computer's own power would be enough because I could see the USB device.
At this point the flashing seems to be working. At least I see a lot of messages from GDB. But I'm not seeing Hello World output on the serial port, so maybe something else is wrong. I'm going to start a new thread for that issue.
Thank you for your help here. I didn't realize that the two power jumpers (J36 and J57) - have pin 1 in the rightmost position (when the board is held such that the text is readable), which is opposite to the way all of the other jumpers on the board are oriented.
I have now found out why the code wasn't running (passed wrong parameters to build.bat). It's working now.
Thanks much for your help regarding jumper settings.
I still think there should be a document listing simple step-by-step instructions for setting up a build environment on all three platforms (Windows, Linux and macOS) but that's beyond the scope of this discussion thread.