Issues using gdb with wifi dev board

I have some issues trying to debug my firmware. I am fairly new to gdb.
I modified the firmware, flashed it to the flipper via qflipper and it ran to some extend.
When I run ./fbt blackmagic to debug it the gdb version downloaded by the fbt script starts running (10.3-2022.07). This version is different from the one mentioned in the documentation, which I installed according to the instructions.
However gdb cannot connect to the remote target with the output attached. Some searching suggests it is because of a mismatch in gdb version and its capabilities.

What am I missing here? Am I doing something wrong, or is it the gdb version?

Remote debugging using /dev/ttyACM0
Ignoring packet error, continuing…
warning: unrecognized item “timeout” in “qSupported” response
Ignoring packet error, continuing…
Remote replied unexpectedly to ‘vMustReplyEmpty’: timeout
“monitor” command not supported by this target.
“monitor” command not supported by this target.
Don’t know how to attach. Try “help target”.

Hi! Can you provide the output of lsusb so we can check where the blackmagic board is connected?

Also, can you uncomment line 30 in the file site_scons/site_tools/blackmagic.py and show the output of running ./fbt blackmagic again?

Hey, I think this is what you were looking for at lsusb:

Bus 001 Device 015: ID 303a:4001 Flipper Devices Inc. Blackmagic ESP32

And here is the output of fbt blackmagic whith line 30 uncommented (everything after this is unchanged):

/dev/ttyACM1 {‘device’: ‘/dev/ttyACM1’, ‘name’: ‘ttyACM1’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.2’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.2’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’}
/dev/ttyACM0 {‘device’: ‘/dev/ttyACM0’, ‘name’: ‘ttyACM0’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.0’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.0’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’}
/dev/ttyACM1 {‘device’: ‘/dev/ttyACM1’, ‘name’: ‘ttyACM1’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.2’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.2’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’}
/dev/ttyACM0 {‘device’: ‘/dev/ttyACM0’, ‘name’: ‘ttyACM0’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.0’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.0’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’}
/dev/ttyACM1 {‘device’: ‘/dev/ttyACM1’, ‘name’: ‘ttyACM1’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.2’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.2’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’}
/dev/ttyACM0 {‘device’: ‘/dev/ttyACM0’, ‘name’: ‘ttyACM0’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.0’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.0’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’}
/dev/ttyACM1 {‘device’: ‘/dev/ttyACM1’, ‘name’: ‘ttyACM1’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.2’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.2’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’}
/dev/ttyACM0 {‘device’: ‘/dev/ttyACM0’, ‘name’: ‘ttyACM0’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.0’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.0’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’}
arm-none-eabi-gdb-py -ex “target extended-remote /dev/ttyACM0” -ex “set confirm off” -ex “monitor swdp_scan” -ex “monitor debug_bmp enable” -ex “attach 1” -ex “set mem inaccessible-by-default off” -ex “source debug/FreeRTOS/FreeRTOS.py” -ex “source debug/PyCortexMDebug/PyCortexMDebug.py” -ex “svd_load debug/STM32WB55_CM4.svd” -ex compare-sections build/f7-firmware-D/firmware.elf
/dev/ttyACM1 {‘device’: ‘/dev/ttyACM1’, ‘name’: ‘ttyACM1’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.2’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.2’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.2’}
/dev/ttyACM0 {‘device’: ‘/dev/ttyACM0’, ‘name’: ‘ttyACM0’, ‘description’: ‘Blackmagic ESP32 - Blackmagic ESP32’, ‘hwid’: ‘USB VID:PID=303A:4001 SER=blackmagic LOCATION=1-2:1.0’, ‘vid’: 12346, ‘pid’: 16385, ‘serial_number’: ‘blackmagic’, ‘location’: ‘1-2:1.0’, ‘manufacturer’: ‘Flipper Devices Inc.’, ‘product’: ‘Blackmagic ESP32’, ‘interface’: ‘Blackmagic ESP32’, ‘usb_device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2’, ‘device_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’, ‘subsystem’: ‘usb’, ‘usb_interface_path’: ‘/sys/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2/1-2:1.0’}

By the way, the wifi method is working (somewhat…)