Author Topic: Newbie needs help debugging AVR under linux  (Read 14011 times)

Offline dschlic1

  • Single posting newcomer
  • *
  • Posts: 2
Newbie needs help debugging AVR under linux
« on: March 27, 2010, 02:24:10 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: Newbie needs help debugging AVR under linux
« Reply #1 on: March 27, 2010, 03:22:31 pm »
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.
« Last Edit: March 27, 2010, 03:25:52 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline dschlic1

  • Single posting newcomer
  • *
  • Posts: 2
Re: Newbie needs help debugging AVR under linux
« Reply #2 on: March 30, 2010, 12:03:37 am »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: Newbie needs help debugging AVR under linux
« Reply #3 on: March 30, 2010, 04:05:33 am »
Result using forum search

http://forums.codeblocks.org/index.php/topic,6819.msg53408.html#msg53408

No idea if the message will help or not; I do not use AVR.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline lehua768

  • Single posting newcomer
  • *
  • Posts: 2
Re: Newbie needs help debugging AVR under linux
« Reply #4 on: April 20, 2010, 09:33:22 am »
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.
removed ad from signature
Jens

Offline Aelxx

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Newbie needs help debugging AVR under linux
« Reply #5 on: April 20, 2010, 08:23:33 pm »
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.
« Last Edit: April 20, 2010, 08:26:30 pm by Aelxx »