Black magic debug probe with pixhawk

Hi,

I have been dealing with px4 flight stack on both pixhawk and snapdragon flight for a while.
I have ordered the blackmagic probe for debugging issues but i have not been able to work with it.

I connected them to Pixhawk after soldering the connectors, then uploaded the firmware for Blackmagic using the instructions on :

https://pixhawk.org/dev/jtag/black_magic_probe

Then, I ran

/usr/local/bin/arm-none-eabi-gdb firmware_nuttx

and then
target extended-remote /dev/ttyACM1
and I get:

(gdb) target extended-remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
Ignoring packet error, continuing…
warning: unrecognized item “timeout” in “qSupported” response
Ignoring packet error, continuing…
Ignoring packet error, continuing…
Ignoring packet error, continuing…
Bogus trace status reply from target: timeout
(gdb)

Shall I compile the code for debugging using different commands than make px4fmuv2-default?
What’s my problem?
BR,

Burak

Make sure you disconnect the probe from the target, then power the target, then power the probe, and only then connect them. The probe has an electrical design flaw that can bring it into a brown-out state if you connect it before powering it.

Hi Lorenz, Thanks for heads up,

I have powered the target, then the probe (not connected to target), then connected them and ran the below code, but I think nothing changed.

/usr/local/bin/arm-none-eabi-gdb /home/burakmetin/Documents/BitbucketOtopilot/otopilot/build_px4fmu-v2_default/src/firmware/nuttx/firmware_nuttx
GNU gdb (GDB) 7.11
Copyright © 2016 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=x86_64-pc-linux-gnu --target=arm-none-eabi”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from /home/burakmetin/Documents/BitbucketOtopilot/otopilot/build_px4fmu-v2_default/src/firmware/nuttx/firmware_nuttx…done.
(gdb) target extended-remote /dev/ttyACM0
Remote debugging using /dev/ttyACM0
Invalid run length encoding: S�
Invalid run length encoding: Sh
Invalid run length encoding: Sf
Ignoring packet error, continuing…
warning: unrecognized item “Sf” in “qSupported” response
Invalid run length encoding: !S�
Reply contains invalid hex digit 0
(gdb) target extended-remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
(gdb)
(gdb)
(gdb) target extended-remote /dev/ttyACM2
Already connected to a remote target. Disconnect? (y or n) y
Remote debugging using /dev/ttyACM2
Ignoring packet error, continuing…
warning: unrecognized item “timeout” in “qSupported” response
Ignoring packet error, continuing…
Ignoring packet error, continuing…
Ignoring packet error, continuing…
Bogus trace status reply from target: timeout
(gdb)

Can you uninstall the modem manager? sudo apt-get remove modemmanager.

Hey @LorenzMeier,

I can’t find the -g flag within the current Makefile, yet I am able to set breakpoints and such. Is this not normally the case when using GDB?

Curious…