How to set up debugging under linux

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hate being stranded on Microsoft Island because I can't seem to get debugging using a simulator to work on linux. Actually I don't even know where to start.
I read some topics on this, but still don't get it

I would love to see some kind of tutorial on this, i'm quie sure this isn't an uncommon problem. Also if a complete IDE exists under linux, that would be even better, but I'm quite sure there isn't. Or if one would run under wine.

axos88

axos88

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As GCC is your only option here I'll move this into the visibility of the GCC experts in the GCC forum where you'll find previous traffic about avarice etc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let's start with the last one: there's plenty of IDEs. After all, an
IDE is nothing much more but an editor that has the ability to run
the compiler, and can parse the compiler's diagnostic output. There
are systems around that have been established as an IDE from ground
up, like KDevelop, but about every of the major Unix editors can also
attach to the compiler, and thus form the base of an IDE. So it's just
your turn to see what would fit you best because you have to chose your
IDE instead of being given just a single one. ;-)

Simulation is the weakest part of the opensource tools. There's the
historic simulavr code which lacks a lot of features in the IO part,
but is at least suitable to verify algorithms against. It can cooperate
with AVR-GDB by using GDB's "remote target" facility: you run simulavr
with option -g, and it will listen on a TCP socket (by default, port
number 1212). Then, you start AVR-GDB, and tell it "target remote
:1212". Note that you cannot "run" from there because that would require
a host machine that can run the code, you simply "continue" there.

There's also a successor called simulavrxx, but it has not seen a
formal release within a couple of years (albeit some development
within its CVS tree), and in general is a do-it-yourself job if you
want to compile it. Once done, it supposedly supports a lot more of
the AVRs IO feature set than the old historic simulavr did.

Despite editors that can embed GDB in an IDE-like style, there's also
a variety of GUI frontends to GDB in case you prefer it that way. The
most famous one is DDD which is said to work well with AVR-GDB. Insight
might be wort mentioning because, unlike DDD, it can also be compiled
under Win32 so it is also part of WinAVR.

Beyond simulation, there are also emulation options using Atmel's JTAG
ICE (or clones thereof), or the AVR Dragon. There's a program called
avarice to talk to the JTAG ICE (or Dragon) through a serial or USB
port, and to offer GDB support through the remote target facility on
the upper side. Thus, GDB operation is the same as above, only working
against a real AVR rather than a simulator.

Finally, you could run VMlab under Wine. Alas, VMlab is no longer being
developed, so that's somewhat like a dead end. Also, VMlab is about the
last program that would still require the now obsolete AVR-COFF object
format, so you'd have to make sure your avr-binutils have the AVRCOFF
patch applied. See Bingo600's Linux build script on top of the forum.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello axos88,

I am trying the same, up to my level you can refer the posting at the following link.
https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=58173

For, any new search or hint please let me know.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ugh... VMLab is not an option, because it doesn't support my AVR (mega8515). I don't feel like spending 50$ or more on a JTAG (isn't there a diy version of this kit?) What is so complicated about them? And by IDE I meant that it could debug my code, not just parse the compiler output, Eclipse could do that for sure...

So I guess I'm stuck with uSoft :(

axos88

axos88

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, for me, Emacs is working as a perfect IDE...

Alas, the ATmega8515 cannot even use an in-circuit emulator. More
modern AVRs could use the AVR Dragon, which is pretty good value for
the money.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.