SDK: qca4020-or-3-5_qca_oem_sdk-cdb
I can build all the demo application and also flash using "flash_openocd.sh". But after removing the jumper J31 1&2, and power cycle the CDB didn't come up.
I appreciate help to debug what's wrong with the setup.
Here are the few lines of flash output:
./flash_openocd.sh
Open On-Chip Debugger 0.10.0
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"
Info : QM4.cpu: hardware has 6 breakpoints, 4 watchpoints
[2021-11-30 21:05:45,840] INFO: Checking for files to add to the image for Firmware Descriptor Table 0 File:gen_fwd_table.py:662 Function:gen_xml_program
[2021-11-30 21:05:45,847] INFO: Done Generating XML file to program. File:gen_fwd_table.py:700 Function:gen_xml_program
[2021-11-30 21:05:45,901] INFO: flash_through_gdb.py version 1.0.5 File:flash_through_gdb.py:582 Function:main
[2021-11-30 21:05:45,911] DEBUG: Output Directory is gdbout/ File:flash_through_gdb.py:614 Function:main
[2021-11-30 21:05:45,912] DEBUG: Search Path 1 /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/ File:flash_through_gdb.py:626 Function:main
[2021-11-30 21:05:45,912] DEBUG: Search Path 2 /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/bin/cortex-m0/threadx/ File:flash_through_gdb.py:626 Function:main
[2021-11-30 21:05:45,912] DEBUG: Search Path 3 /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/bin/wlan/ File:flash_through_gdb.py:626 Function:main
[2021-11-30 21:05:45,912] DEBUG: Search Path 4 ./ File:flash_through_gdb.py:626 Function:main
[2021-11-30 21:05:45,915] ERROR: The file firmware_table.bin is found in two places /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin and ./firmware_table.bin, using the first File:flash_through_gdb.py:64 Function:search_for_file
[2021-11-30 21:05:45,915] INFO: Will write file /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin into sectors [0, 0] File:flash_through_gdb.py:661 Function:main
[2021-11-30 21:05:45,915] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 Function:run
[2021-11-30 21:05:45,920] INFO: GDB may require shell=true, will try on shell mode File:flash_through_gdb.py:422 Function:_check_need_shell
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 srst 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
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 0x5c58 lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x68c lma 0x10080000
Start address 0x100462c2, load size 25316
Transfer rate: 252 KB/sec, 8438 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c: No such file or directory.
"WRITE /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin, offset=0 start_sector=0 num_sectors=1"Restoring binary file /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin into memory (0x10081ed8 to 0x10082ed8)
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection
[2021-11-30 21:05:48,394] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 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 0x5c58 lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x68c lma 0x10080000
Start address 0x100462c2, load size 25316
Transfer rate: 254 KB/sec, 8438 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/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/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection
[2021-11-30 21:05:50,110] INFO: Data successfully flashed to disk for /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/firmware_table.bin File:flash_through_gdb.py:678 Function:main
[2021-11-30 21:05:50,111] ERROR: The file Quartz_HASHED.elf is found in two places /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/Quartz_HASHED.elf and ./Quartz_HASHED.elf, using the first File:flash_through_gdb.py:64 Function:search_for_file
[2021-11-30 21:05:50,111] INFO: Will write file /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/Quartz_HASHED.elf into sectors [35, 151] File:flash_through_gdb.py:661 Function:main
[2021-11-30 21:05:50,111] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 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 0x5c58 lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x68c lma 0x10080000
Start address 0x100462c2, load size 25316
Transfer rate: 220 KB/sec, 8438 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c: No such file or directory.
"WRITE /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/Quartz_HASHED.elf, offset=0 start_sector=35 num_sectors=8"Restoring binary file /home/fwuser/ws/qca4020-or-3-5_qca_oem_sdk-cdb/target/quartz/demo/Helloworld_demo/build/gcc/output/Quartz_HASHED.elf into memory (0x10081ed8 to 0x10089ed8)
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection
[2021-11-30 21:05:52,505] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 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.
...
....
2021-11-30 21:07:29,809] INFO: Will erase sectors on range [19, 34] File:flash_through_gdb.py:644 Function:main
[2021-11-30 21:07:29,810] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 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 0x5c58 lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x68c lma 0x10080000
Start address 0x100462c2, load size 25316
Transfer rate: 257 KB/sec, 8438 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c: No such file or directory.
$1 = "ERASE start_sector=19 num_sectors=16"
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection
[2021-11-30 21:07:31,598] INFO: Will erase sectors on range [1, 2] File:flash_through_gdb.py:644 Function:main
[2021-11-30 21:07:31,599] DEBUG: /opt/gcc/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb --command="gdbout/gdb_commands.txt" --batch File:flash_through_gdb.py:436 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 0x5c58 lma 0x10046000
Loading section RAM_FOM_APPS_RW_REGION, size 0x68c lma 0x10080000
Start address 0x100462c2, load size 25316
Transfer rate: 257 KB/sec, 8438 bytes/write.
Breakpoint 1 at 0x1004614c: file /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c, line 125.
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c: No such file or directory.
$1 = "ERASE start_sector=1 num_sectors=2"
Breakpoint 1, main_c () at /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c:125
125 in /local/mnt/workspace/CRMBuilds/IOT.QZ.3.5.r1-00007-QZHW-1_20210928_042710/b/ioesw_proc/core/storage/tools/jtagprogrammer/src//JtagProgrammer.c
Info : dropped 'gdb' connection
[2021-11-30 21:07:33,209] INFO: Script finished processing generated_fwd_table.xml File:flash_through_gdb.py:704 Function:main
Finished Flashing
[1] 46627 terminated ./flash_openocd.sh
Assume you are using python 3 to build and "build.bat f 4020 cdb" command resulted in successful compilation and linking.
There shouldnt be any issue if the valid image is flashed on CDB device.
Can you try switch to Helloworld_Demo and check the behaviour ?