Code::Blocks Forums
User forums => Embedded development => Topic started by: lnsdf on January 29, 2013, 06:23:17 am
-
Hey.
So I'm, trying to debug my AVR project in codeblocks by using simulavr to simulate the mcu. If I open simulavr in a terminal window and set it to listen for avr-gdb then I can connect to it with avr-gdb in codeblocks then debugging works in the IDE. The only problem is the fact that I have to manually run simulavr in a terminal. Is there any way I can have simulavr be run automatically before avr-gdb is launched? I've tried adding it to the additional shell commands before connection for GDB but it doesn't seem to work.
-
You can setup a tool.
-
Unfortunately 'shell commands' feature of 'gdb' waits the command it launched to finish before resuming the debugging session. I mean if you try to launch the gdb-server (simulavr in your case) from shell commands, it gets launched but you can't continue debugging because gdb waits for it to finish. I tried .bat files to prevent this from happening with no luck. So another alternative is to setup a tool as Obfuscated said. Then assign a shortcut to the tool you've created and use it before running gdb.
-
Thanks for the suggestion to use tools! I never thought of that. In fact, it ends up working out better because after a debugging session I must kill simulavr with ^C which would not be possible if the shell command option actually worked. It is much better then manually opening a terminal window. :)