Forums - flash_openocd issue?

2 posts / 0 new
Last post
flash_openocd issue?
jackshi
Join Date: 24 Sep 18
Posts: 1
Posted: Mon, 2019-10-07 08:40

We try to flash Helloworld_demo into board, we have following debug log:

at the beggining, we can also see 

Quote:
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

 

but all these files are already in parent folder, maybe script will copy them to output folder, so I suppose it is not an issue for these log

The problem is debug log keep showing following log

Quote:
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)

 

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?

After  one minutes, it will show

Quote:
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:33:12,207] INFO: Script finished processing generated_fwd_table.xml File:flash_through_gdb.py:718 Functio n:main Flash Operation Completed Successfully... SUCCESS: The process "openocd.exe" with PID 8268 has been terminated.

 

But I still have nothing print out on UART connect to J85  after remove J31.

 

Quote:

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.
Open On-Chip Debugger 0.10.0 (2017-06-09) [https://github.com/sysprogs/openocd]
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.
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".
[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)?

  • Up0
  • Down0
raja_pedada
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 183
Posted: Mon, 2019-10-07 20:11

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:

"WRITE ./firmware_table.bin, offset=0 start_sector=0 num_sectors=1"Restoring binary file ./firmware_table.bin into memor
y (0x10081bf8 to 0x10082bf8)
...
"READ gdbout/firmware_table.bin_readback, append=0 start_sector=0 num_sectors=1"
...
"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)

 

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