AI-deck jtag wrong states
Posted: Wed Jun 16, 2021 6:13 am
Recently, I am working on the AI-deck wifi-streamer example. There is two port to upload the code on the AI-deck, the NINA JTAG and the GAP8 JTAG. I upload the GAP8 code with the NINA JTAG by mistake. Then when I change to GAP8 JTAG I can't upload code to AI-DECK any more and the LED on the AI-deck don't flash any more(but the power LED is still on). The terminal will display like this.
gapy --target=ai_deck --platform=board --work-dir=/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV run --exec-prepare --exec --binary=/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV/test
Launching execution with command:
gap8-openocd -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f interface/jlink.cfg -f target/gap8revb.tcl -f tcl/jtag_boot_entry.tcl -c 'gap8_jtag_load_binary_and_start "/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV/test" elf 0x1c000080'
Open On-Chip Debugger 0.10.0+dev-dirty (2021-06-12-10:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
Warn : Interface already configured, ignoring
TARGET create
Info : core 0 selected
0
Info : gap8_adv_debug_itf tap selected
Info : adv_dbg_unit debug unit selected
Info : Option 7 is passed to adv_dbg_unit debug unit
GAP8 INIT TARGET
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 3.287 V
Info : clock speed 1500 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: gap8.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
GAP8 examine target
Init jtag
Initialising GAP8 JTAG TAP
Info : adv debug unit is configured with option BOOT MODE JTAG
Info : adv debug unit is configured with option ADBG_USE_HISPEED
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
I'm using jlink v11 to debug the AI-deck. And I've tried to hold the button on the AI-deck and flash the ESP32 (NINA) with a working firmware.
bitcraze@ubuntu:~/projects/gap_sdk/AIdeck_examples/NINA/firmware$ /home/bitcraze/esp/openocd-esp32/src/openocd -f /home/bitcraze/esp/openocd-esp32/tcl/interface/jlink.cfg -f /home/bitcraze/esp/openocd-esp32/tcl/board/esp-wroom-32.cfg -c "program_esp32 build/partitions_singleapp.bin 0x8000 verify" -c "program_esp32 build/bootloader/bootloader.bin 0x1000 verify" -c "program_esp32 build/ai-deck-jpeg-streamer-demo.bin 0x10000 verify reset exit"
Open On-Chip Debugger v0.10.0-esp32-20210401-39-gfd267384 (2021-06-14-23:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1500 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 3.305 V
Info : clock speed 1500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Target halted, PC=0x400800C0, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x40082A9F, debug_reason=00000000
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 95 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 472 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 2048 KB
Info : Using flash bank 'esp32.cpu0.flash' size 2048 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 95 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 472 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 2048 KB
Info : Using flash bank 'esp32.cpu1.flash' size 2048 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 184.581 ms @ 21.6707 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 107.901 ms @ 27.8033 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 892.824 ms @ 31.3612 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 683.843 ms @ 35.37 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 21276.9 ms @ 31.3956 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 18471.1 ms @ 36.0935 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
** Resetting Target **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
shutdown command invoked
But the gap8 still don't work and have the same problem.
gapy --target=ai_deck --platform=board --work-dir=/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV run --exec-prepare --exec --binary=/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV/test
Launching execution with command:
gap8-openocd -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f interface/jlink.cfg -f target/gap8revb.tcl -f tcl/jtag_boot_entry.tcl -c 'gap8_jtag_load_binary_and_start "/home/bitcraze/projects/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV/test" elf 0x1c000080'
Open On-Chip Debugger 0.10.0+dev-dirty (2021-06-12-10:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
Warn : Interface already configured, ignoring
TARGET create
Info : core 0 selected
0
Info : gap8_adv_debug_itf tap selected
Info : adv_dbg_unit debug unit selected
Info : Option 7 is passed to adv_dbg_unit debug unit
GAP8 INIT TARGET
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 3.287 V
Info : clock speed 1500 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: gap8.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
GAP8 examine target
Init jtag
Initialising GAP8 JTAG TAP
Info : adv debug unit is configured with option BOOT MODE JTAG
Info : adv debug unit is configured with option ADBG_USE_HISPEED
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
Warn : Burst read timed out
I'm using jlink v11 to debug the AI-deck. And I've tried to hold the button on the AI-deck and flash the ESP32 (NINA) with a working firmware.
bitcraze@ubuntu:~/projects/gap_sdk/AIdeck_examples/NINA/firmware$ /home/bitcraze/esp/openocd-esp32/src/openocd -f /home/bitcraze/esp/openocd-esp32/tcl/interface/jlink.cfg -f /home/bitcraze/esp/openocd-esp32/tcl/board/esp-wroom-32.cfg -c "program_esp32 build/partitions_singleapp.bin 0x8000 verify" -c "program_esp32 build/bootloader/bootloader.bin 0x1000 verify" -c "program_esp32 build/ai-deck-jpeg-streamer-demo.bin 0x10000 verify reset exit"
Open On-Chip Debugger v0.10.0-esp32-20210401-39-gfd267384 (2021-06-14-23:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1500 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 3.305 V
Info : clock speed 1500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Target halted, PC=0x400800C0, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x40082A9F, debug_reason=00000000
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 95 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 472 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 2048 KB
Info : Using flash bank 'esp32.cpu0.flash' size 2048 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 95 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 472 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 2048 KB
Info : Using flash bank 'esp32.cpu1.flash' size 2048 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 184.581 ms @ 21.6707 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 107.901 ms @ 27.8033 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 892.824 ms @ 31.3612 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 683.843 ms @ 35.37 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
WARNING: Function (program_esp32) is deprecated, and may be removed in a future release.
Use (program_esp) instead.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 21276.9 ms @ 31.3956 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : PROF: Data transferred in 18471.1 ms @ 36.0935 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
** Resetting Target **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
shutdown command invoked
But the gap8 still don't work and have the same problem.