avr-gdb is a special version of GDB: The GNU Project Debugger built for avr processor target, thus it can run and debug code writen for those processors. During debugging session, simutron runs in conjuction with this debugger.
* This kind of session is known as remote debugging. One program (in our case simutron) runs a debuggee - a code which will be debugged and provides a debugging server or backend. Another program (i.e. avr-gdb) communicates with debugging server via some protocol (in our case TCP/IP) and provides user interface to set breakpoints, step through code and so on.
Linux
${HOME}/local/simutron is a directory where personally I put simutron files and install all the related tools. In this way I avoid root privilege requirements.
Note: prior to building avr-gdv it may be necessary to install avr-gcc toolchain, which is certainly available in every Linux repository.
In CodeBlocks main menu choose "Settings", "Debugger.."
Cilick "Common" item on the left. Fill in parameters as follows:
Cilick "GDB/CDB debugger" item on the left.
Click "Create Config" button.
Type in a name for debugger configuration, e.g. avr-gdb, press Ok.
New configuration appears at the left under "Default". Click it.
Fill in parameters as follows and press Ok:
In CodeBlocks main menu choose "Settings", "Compiler.."
Select "Global compiler settings" on the left.
In the combo box at the top choose the AVR gcc compiler suite you used to compile your firmware.
Go to the "Toolchain executables" tab.
In the "Debugger:" combo box select avr-gdb configuration you just created. Press Ok.
Right click your AVR firmware project in the projects tree, select "Properties..".
Go to "Debugger" tab, select the target where you built debugging version of your firmware.
Fill in "IP address:" and "Port:" fields as follows:
Congratulation!
Now you can start debugging yor code.