GDB Monitor commands for debugging AVR microcontrollers on GNU/Linux
Bloom's GDB server supports a number of custom GDB commands, which can be invoked via the
monitor command in avr-gdb.
(gdb) monitor [COMMAND_NAME]
reset command can be used to reset the connected target.
(gdb) monitor reset Target reset complete - use the 'continue' command to begin execution. (gdb)
Upon issuing the command, Bloom will reset the connected target to its reset vector, and hold it in a stopped state. Execution can then be restarted via GDB.
Generate SVD file
This command was introduced in version 0.11.0.
svd command can be used to generate a System View Description (SVD) XML
file, for the connected target.
(gdb) monitor svd SVD output saved to /path/to/project/ATxmega16C4.svd (gdb)
Upon issuing the command, Bloom will generate the SVD XML and save it to a file in the current project
directory. Or, if the
--out option was passed, Bloom will send the XML to
GDB, to present as command output.
If the output file already exists, it will be overwritten.
For AVR targets, the peripheral base addresses in the generated SVD will be offset by 0x00800000. This offset is required by GDB, for accessing the SRAM address space on AVR targets via GDB.
The generated SVD will not include register fields. This is due to a limitation in Bloom. Report an issue to express demand for this.
This command was introduced in version 0.12.0.
eeprom fill command can be used to fill the target's EEPROM with a
specified hexadecimal value. The value can be specified via the
(gdb) monitor eeprom fill --value=aabbcc Filled 1024 bytes of EEPROM, with values: aabbccaabbccaabbccaabbccaabbccaabbcc ... (gdb)
Upon issuing the command, Bloom will immediately fill the target's entire EEPROM with the specified value.
If the specified value is smaller than the target's EEPROM capacity, it will be repeated across the entire EEPROM address range. If the value size is not a multiple of the EEPROM capacity, the value will be truncated in the final repetition. If the value size exceeds the EEPROM capacity, the command will be rejected.
Writing to EEPROM does not require the target to be in programming mode - this means it can be done during a debug session, without requiring a target reset.
This command can be used to erase the target's EEPROM:
(gdb) monitor eeprom fill --value=ff Filled 1024 bytes of EEPROM, with values: fffffffffffffffffffffff ... (gdb)
This command can take a considerable amount of time to execute. GDB may report timeout errors in the form of "Ignoring packet error, continuing..." messages:
(gdb) monitor eeprom fill --value=aabbcc Ignoring packet error, continuing... Ignoring packet error, continuing... Filled 1024 bytes of EEPROM, with values: ... (gdb)
These messages can be ignored. To remove them, increase GDB's timeout:
(gdb) show remotetimeout Timeout limit to wait for target to respond is 2. (gdb) set remotetimeout 30 (gdb) show remotetimeout Timeout limit to wait for target to respond is 30. (gdb)
The timeout value is in seconds. The
set remotetimeout 30 command will
set the timeout to 30 seconds.
Display help text
help command can be used to display the server's help text, which
describes the supported
(gdb) monitor help
Display version number
version command can be used to display Bloom's current version number.
(gdb) monitor version
version machine command can be used to display Bloom's current version
number, in machine-friendly (JSON) format.
(gdb) monitor version machine