I can not fix this "issue", I have tried different openocd, different QCA4020 SDK, and also tried on different platform (windows and linux), same output, I do not know if this type of log means some wrong with my setup?
But I still have nothing print out on UART connect to J85 after remove J31.
D:\projects\QCA4020.OR.3.0_00011.1\target\quartz\demo\Helloworld_demo\build\gcc>build.bat
****************************************************************************
Building Quartz Helloworld Demo for v2 Chipset
RTOS freertos
CHIPSET VARIANT qca4020
*****************************************************************************
Exporting Device config files....
GENERATING DEVCFG....
Building hello_world.c
Building pal\pal.c
Building export\platform_oem.c
Building export\platform_oem_som.c
Building export\platform_oem_mom.c
Building export\DALConfig_devcfg.c
Building export\DALConfig_fom.c
Building export\devcfg_devcfg_data.c
Building export\devcfg_fom_data.c
Building export\UsrEDL.c
Attempting to convert windows paths: output\LinkerLibs.txt
Generating Linker Scripts...
Linking...
Hashing...
D:\projects\QCA4020.OR.3.0_00011.1\target\quartz\demo\Helloworld_demo\build\gcc>flash_openocd.bat
SUCCESS: The process "openocd.exe" with PID 12576 has been terminated.
Licensed under GNU GPL v2
For bug reports, read
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"
Could Not Find D:\projects\QCA4020.OR.3.0_00011.1\target\quartz\demo\Helloworld_demo\build\gcc\output\firmware_table.bin
Could Not Find D:\projects\QCA4020.OR.3.0_00011.1\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_partitio
n_table.xml
Info Could Not Find D:\projects\QCA4020.OR.3.0_00011.1\target\quartz\demo\Helloworld_demo\build\gcc\output\generated_fwd
_table.xml
: 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 s
rst support.
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-10-07 11:24:03,447] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_tabl
e.py:673 Function:gen_xml_program
[2019-10-07 11:24:03,453] INFO: Done Generating XML file to program. File:gen_fwd_table.py:711 Function:gen_xml_program
Starting GDB Server....
[2019-10-07 11:24:03,744] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:596 Function:main
[2019-10-07 11:24:03,997] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:628 Function:main
[2019-10-07 11:24:03,997] DEBUG: Search Path 1 .\output/ File:flash_through_gdb.py:640 Function:main
[2019-10-07 11:24:03,997] DEBUG: Search Path 2 ..\..\..\..\..\bin\cortex-m0\threadx\ File:flash_through_gdb.py:640 Funct
ion:main
[2019-10-07 11:24:03,999] DEBUG: Search Path 3 ..\..\..\..\..\bin\wlan/ File:flash_through_gdb.py:640 Function:main
[2019-10-07 11:24:03,999] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:640 Function:main
[2019-10-07 11:24:04,009] INFO: Will write file ./firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:675 F
unction:main
[2019-10-07 11:24:04,010] DEBUG: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gdb.ex
e --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:451 Function:run
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 8.1.0.20180315-git
Copyright (C) 2018 Free Software Foundation, Inc.
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".
[2019-10-07 11:24:04,269] INFO: GDB can run without shell=true File:flash_through_gdb.py:435 Function:_check_need_shell
Info : accepting 'gdb' connection on tcp/3333
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x000001c0 in ?? ()
Loading section RAM_FOM_APPS_RO_REGION, size 0x5b4c lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x3ac lma 0x10080000
Start address 0x100462c2, load size 24312
Transfer rate: 255 KB/sec, 8104 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/
core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/s
torage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jtagpr
ogrammer/src//JtagProgrammer.c: No such file or directory.
"WRITE ./firmware_table.bin, offset=0 start_sector=0 num_sectors=1"Restoring binary file ./firmware_table.bin into memor
y (0x10081bf8 to 0x10082bf8)
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/s
torage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jta
gprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection (error -400)
[2019-10-07 11:24:05,249] DEBUG: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gdb.ex
e --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:451 Function:run
Info : accepting 'gdb' connection on tcp/3333
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x1004614c in ?? ()
Loading section RAM_FOM_APPS_RO_REGION, size 0x5b4c lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x3ac lma 0x10080000
Start address 0x100462c2, load size 24312
Transfer rate: 266 KB/sec, 8104 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/
core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/s
torage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jtagpr
ogrammer/src//JtagProgrammer.c: No such file or directory.
"READ gdbout/firmware_table.bin_readback, append=0 start_sector=0 num_sectors=1"
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/s
torage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jta
gprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection (error -400)
[2019-10-07 11:24:06,177] INFO: Data successfully flashed to disk for ./firmware_table.bin File:flash_through_gdb.py:692
Function:main
[2019-10-07 11:24:06,178] INFO: Will write file .\output/Quartz_HASHED.elf into sectors [35, 147] File:flash_through_gdb
.py:675 Function:main
[2019-10-07 11:24:06,178] DEBUG: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gdb.ex
e --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:451 Function:run
Info : accepting 'gdb' connection on tcp/3333
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x1004614c in ?? ()
Loading section RAM_FOM_APPS_RO_REGION, size 0x5b4c lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x3ac lma 0x10080000
Start address 0x100462c2, load size 24312
Transfer rate: 263 KB/sec, 8104 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/
core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/s
torage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jtagpr
ogrammer/src//JtagProgrammer.c: No such file or directory.
"WRITE .\output/Quartz_HASHED.elf, offset=0 start_sector=35 num_sectors=8"Restoring binary file .\output/Quartz_HASHED.e
lf into memory (0x10081bf8 to 0x10089bf8)
Program received signal SIGINT, Interrupt.
main_c () at /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/j
tagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/CNSS_W.QZ.3.0-00078-QZHW-1_20181109_142759/b/ioesw_proc/core/storage/tools/jta
gprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection (error -400)
Traceback (most recent call last):
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 737, in <module>
result = main()
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 676, in main
result = gdb_flash.write (file_path, start_sector, num_sectors)
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 320, in write
self._gdb_cmd_done ()
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 235, in _gdb_cmd_done
self.run()
File "..\..\..\..\..\build\tools\flash/flash_through_gdb.py", line 457, in run
subprocess.call (exec_str)
File "C:\Python27\lib\subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 693, in wait
_subprocess.INFINITE)
KeyboardInterrupt
Terminate batch job (Y/N)?
Kindly use "build.bat t 4020 cdb" to build the Hello World demo and flash on to the device to check the serial COM PORT.
The debu log traces are expected behaviour and it usually takes a minute to flash the device using JTAG.
You can keep a track of flashing progress using below traces:
...