-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to debug using jlink #1293
Comments
I think the problem is described in this line:
Both MCU in the Crazyflie uses the
According to the cortex debug doc this can be done in
However I am have never tried that so it might need some tweaking. What I would suggest instead is to switch server to either jlink or pyocd, in the
The jlink server requires downloading the Linux jlink driver and the pyocd server can be installed simply via the package manager or |
Thanks for the hint. I solved the issue by adding the command I also tried out your other suggestions, as explained below.
I added this line to the launch.json file, and obtained the error
First I tried using jlink. It worked fine, but I had to replace the line At the end I tried out also pyocd. The program could start, however it took it more time to stop at a code line, and it seems that it just stops somewhere in the program and not in the main function. Here is the output in the terminal
I am new to the on chip debugging so I might be missing basic rules. Let me know if you want me to try other things |
If I understand your message well, you got it to work with J-Link, in that case you should just use the J-Link server since it should be the best when using a J-Link debug probe anyway. So if it is the case your problem should be solved? As for OpenOCD and pyocd, this is things that require investigation. For pyocd it is very strange that it stopped on the wrong line and it would indicate that the wrong file was used (mismatch between the flashed version and the file on the PC). I am especially interested by the last line in the log though: if we could get FreeRTOS support by default it would help a lot debugging (it allows to see the state of all the tasks when debugging, not only the one that has been broken). |
Next step for this issue is to update the documentation for it to work with J-link and possibly trying to get PyOCD working by default. |
Hi! I'm reopening one, as we still would need to add this to our documentation, as we treat issues as To Do's :) |
Yes. The problem is solved and I can debug using jlink debug module. For flashing I still use openocd, because the makefile provided in the crazyfie-firmware uses it. But for debugging I choose the jlink server |
I keep getting the following errors when I try the on chip debugging platform.
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : auto-selecting first available session transport "jtag". To override use 'transport select '.
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : J-Link V11 compiled May 23 2023 14:44:38
Info : Hardware version: 11.00
Info : VTarget = 2.980 V
Info : clock speed 2000 kHz
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0)
Info : TAP auto0.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto1.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto2.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto3.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto4.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto5.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto6.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto7.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto8.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto9.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto10.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto11.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto12.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto13.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto14.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto15.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto16.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto17.tap does not have valid IDCODE (idcode=0x0)
Info : TAP auto18.tap does not have valid IDCODE (idcode=0x0)
Warn : Unexpected idcode after end of chain: 83 0x00000000
Warn : Unexpected idcode after end of chain: 115 0x00000000
Warn : Unexpected idcode after end of chain: 147 0x00000000
Warn : Unexpected idcode after end of chain: 179 0x00000000
Warn : Unexpected idcode after end of chain: 211 0x00000000
Warn : Unexpected idcode after end of chain: 243 0x00000000
Warn : Unexpected idcode after end of chain: 275 0x00000000
Warn : Unexpected idcode after end of chain: 307 0x00000000
Warn : Unexpected idcode after end of chain: 339 0x00000000
Warn : Unexpected idcode after end of chain: 371 0x00000000
Warn : Unexpected idcode after end of chain: 403 0x00000000
Warn : Unexpected idcode after end of chain: 435 0x00000000
Warn : Unexpected idcode after end of chain: 467 0x00000000
Warn : Unexpected idcode after end of chain: 499 0x00000000
Warn : Unexpected idcode after end of chain: 531 0x00000000
Warn : Unexpected idcode after end of chain: 563 0x00000000
Warn : Unexpected idcode after end of chain: 595 0x00000000
Warn : Unexpected idcode after end of chain: 627 0x00000000
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"
Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Error: Invalid ACK (0) in DAP response
Occurs with:
arm-none-eabi-gdb
Ubuntu 22.04.2 LTS
segger jlink
I followed the instructions in the following link. I modified the configuration files and the launch.json file according to my jlink device. I also tried the on chip debugging for the nrf51, the same errors occur there too.
The text was updated successfully, but these errors were encountered: