Code::Blocks Forums

User forums => Embedded development => Topic started by: Outis on October 30, 2007, 11:30:23 am

Title: AVR-gdb for dummies needed ;-)
Post by: Outis on October 30, 2007, 11:30:23 am
Hi,

can someone help me to create a good avr template project with avr-gdb support, please? At the moment, codeblocks still generates an "atmega8.exe" file -.- (but programming the device works, too).

Also I unfortunately need debugging today :(. Since I've never user a debugger before, I' ve no idea what to do and  all these gdb-topics are all Greek to me.

Thanks.
Title: Re: AVR-gdb for dummies needed ;-)
Post by: BrianSidebotham on November 01, 2007, 01:26:21 pm
Hi, What version of codeblocks are you running? There is an AVR project wizard, which will sort out the filename extension for you. Get the latest nightly build to get the AVR project wizard.

The debugger settings are global, and are not set on a per-project basis, which is a shame.

However, to get avr-gdb working correctly you can follow another thread:
http://forums.codeblocks.org/index.php/topic,6819.msg53408.html#msg53408

Post any troubles you have...
Title: Re: AVR-gdb for dummies needed ;-)
Post by: Outis on November 01, 2007, 08:27:54 pm
Ah! Thank you, I had't downloaded nightlys for some weeks, so I didn't realize that C::B got so much better again  :D

Post any troubles you have...

Well...

simulavr after gdb connect & debug start:
Code
...
memory.c:224: WARNING: **** Attempt to read invalid io reg: UCSRA at 0x002b
memory.c:224: WARNING: **** Attempt to read invalid io reg: UCSRA at 0x002b
... (endless)

source:
Code
if(UCSRA &(1 << RXC)) /*polling usart input*/

ARGH, why must nearly everything fail? I hate it...