This tutorial details how to use the Debuggoid to interact with a target.
- a wifi connection and a MQTT broker,
- a configured Debuggoid to use this wifi connection and MQTT broker,
Flash a target
flash.gdbfile that contains the instructions for gdb. In the file, replace
<hostname>by the hostname or the IP address of the Debuggoid.
target extended-remote <hostname>:2022 load run detach quit
This gdb example script will load the binary into the target, run the program and than detach and quit gdb. Please refer to gdb documentation to get the commands available with GDB.
- From the Linux terminal, launch the script:
$ arm-none-eabi-gdb blink.ino.elf -x flash.gdb
Access to target serial console via MQTT
The target serial console is automatically attached to the MQTT bridge of the debuggoid. Printed chars on console output (such as
Serial.println()) are published on the
debuggoid/<debuggoid_name>/out topic, and chars can be sent to the target using
Subscribe example to see chars from the target:
$ mosquitto_sub -h <broker_hostname> -t "debuggoid/<debuggoid_name>/out"
Publish example to send a
Hello world! string to the target:
$ mosquitto_pub -h <broker_hostname> -t "debuggoid/<debuggoid_name>/in" -m "Hello world!"
Debug a target
Debuggoid accepts gdb debugging commands. Please refer to gdb documentation to get the commands available with GDB.