News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Newbie needs help debugging AVR under linux

Started by dschlic1, March 27, 2010, 02:24:10 PM

Previous topic - Next topic

dschlic1

I am running Ubuntu 9.1. I have installed the AVR tool chain (AVR-GCC, AVR-GDB, simulavr etc), and also have installed Code::Blocks 8.02. I have created a small test program, and wish to run it under simulavr. The code builds without errors (using debug target). However when I try to start the debugger I run into some problems. When I first tried to debug, Code::Blocks gave me an error that the debugger was not setup under Settings->Compiler and debugger. I didn't really find any revelant settings under that menu. Now several days latter, when I try to start the debugger, nothing happens.

Can someone give a short sequence for configuring and using the debugger.

stahta01

#1
1. Install debugger
2. Set the debugger exe under
Settings->Compiler and debugger
Tab: Toolchain Executable
Sub-Tab: Program files

Directions based on recent nightly the 8.02 may be different.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

dschlic1

1. The debugger avr-gdb is installed. I can and have invoked it from a terminal window. When invoked from a terminal window, it can and does connect with Simulavr.
2. In Settings->Compiler and debugger, Tab Toolchain Executable, sub tab Program files, avr-gdb is listed as the debugger.

When I Start the debugger absolutely nothing happens. It appears the avr-gdb is not even started. I can not find it in the list of processes.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

lehua768

1. The debugger avr-gdb is installed. I can and have invoked it from a terminal window. When invoked from a terminal window, it can and does connect with Simulavr.
2. In Settings->Compiler and debugger, Tab Toolchain Executable, sub tab Program files, avr-gdb is listed as the debugger.

Aelxx

#5
As far as I remember Simulavr was rather buggy so it's useless for something longer then 3 lines  :( better try JTAG emulator. Or possibly try with newer build of C::B. For windows there are free AVR-Studio with internal debugger, free VMLAB ide and commercial Proteus VCM with lots of useful staff.