Atmel-ICE, avarice, Eclipse and debugging in Ubuntu

Go To Last Post
66 posts / 0 new

Pages

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

Masochists already exist.
Surely someone already uses Eclipse on Linux.
Surely someone has configured Eclipse to work with AVR.
.
In which case you install Eclipse with associated GCC and GDB tools. And away you go.
Much the same as anyone installs AS7.0 on Windoze and just gets on with the rest of their life.
.
Yes, some experienced punters can build and develop their own tools if that is what they want.
.
David.

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

Hello, I return here after some time when I debugged successfully my ATMEL from Linux with avarice and avr-gdb.

This works fairly ok, I could find some problems that would have been nearly impossible or very difficult to debug with and on-chip-debugging feature.

The only thing that I was not able to do was to install a gui for avr-gdb, which is pretty difficult to use just in command line mode, as you have to type

print each time you want to see the value of a register or a variable, then step, next, finish, continue, info b and so on.

I would like to have some interface for avr-gdb where I can see the source, set watches, see the registers all together.

I already tried to install ddd and gdbgui but to no avail, can someone help me to install a gui that works ok with avr-gdb???

Thanks!

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

But this thread title mentions "Eclipse". Surely you can get the GUI debugger in Eclipse to connect to avr-gdb and drive it from there rather than the command line?

 

In Linux I like to use is "ddd". It was the first GUI debugger I ever used in Linux (20+ years ago) so I have fond memories. Now you say:

bbogdanmircea wrote:
I already tried to install ddd ... but to no avail
So what does that mean? In what way would it not install? Are you talking about making the connection from the debugger to the gdb proxy?

 

PS I just googled "debug AVR with Eclipse" and hit:

 

http://avr-eclipse.sourceforge.net/wiki/index.php/Debugging

 

That was just one hit - I'm sure there'll be more.

Last Edited: Tue. Nov 12, 2019 - 09:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It means that I tried to download the source, compile it and run it, but at some point it failed and I couldn't make it work again.

Now I am installing the AVR Toolchain for eclipse, but the question is how easy is to configure it to work with my custom makefile setup?

I am using eclipse at the moment just as an editor, but for compiling, flashing and debugging I am using the makefile from the Terminal, as I couldn't convince eclipse

to compile by using the makefile.

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

bbogdanmircea wrote:
It means that I tried to download the source, compile it and run it, but at some point it failed and I couldn't make it work again.
Build from source? This is 2019. Why would you ever have to build anything from source in this day and age? Surely the distro repo already has prebuilt copies of anything you could ever want to use? Why can't you simply "sudo apt-get install ddd" or whatever?

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

Ok, I managed to install ddd.

I can open the elf but can't find the process?

Usually I do avr-gdb, and then in avr-gdb I do target remote :4242

What should I do in ddd?

Or should I first configure it to communicate with avr-gdb???

Last Edited: Tue. Nov 12, 2019 - 11:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

Sorry but still it doesn't work ...

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

david.prentice wrote:
Masochists already exist. Surely someone already uses Eclipse on Linux. Surely someone has configured Eclipse to work with AVR. . In which case you install Eclipse with associated GCC and GDB tools. And away you go. Much the same as anyone installs AS7.0 on Windoze and just gets on with the rest of their life. . Yes, some experienced punters can build and develop their own tools if that is what they want. . David.

Can you point to a guide about how to make the debugging work in eclipse?

I already installed the AVR Toolchain in eclipse, I made a Hello World project, compiled it and flashed it successfully on my uC via JTAG.

But when I do Debug then it crashes.

Any idea how to configure also to debugging to work from eclipse?

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

That is why I made that comment.

 

I am sure that several people run Eclipse successfully with an AVR.

In which case it would be nice if someone packaged it up into an "install and go".

 

I use Windoze.   IDE tools have worked fine for years.   AVRStudio4,  AS7.0, IAR, Rowley CrossWorks, ...

Most commercial IDEs are Windows-only.

 

Rowley works on Linux but does not know recent chips or debuggers.

Microchip MPLABX runs on Linux.   Debugging is a bit clunky.   Hopefully,  it will improve.

 

Eclipse for ARM is pretty horrible.   At least when I last attempted.    It may have improved by now.

The AVR market is small.   But there are plenty of ARM users throughout the world.   Both professional and hobbyist.

 

I would give Eclipse a fair trial on Windows if there was an "install and go" and a personal recommendation from AvrFreaks member.

In which case I would be fairly confident that it would have a similar behaviour on Linux.

If developing AVR projects is your professional job,   just BUY a Windows PC and run AS7.0

 

David.

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

There seems to be come corss posting going on here!

 

https://www.avrfreaks.net/commen...

 

As I said in that thread life is too short to try and get gdb etc to work. Either run Windows (laptops on ebay for $50 of which $20 is for the laptop and $30 for the shipping!) and use AS7 or explore MPLABX which is multi-platform and done by the experts (Atmel).

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

david.prentice wrote:

That is why I made that comment.

 

I am sure that several people run Eclipse successfully with an AVR.

In which case it would be nice if someone packaged it up into an "install and go".

 

I use Windoze.   IDE tools have worked fine for years.   AVRStudio4,  AS7.0, IAR, Rowley CrossWorks, ...

Most commercial IDEs are Windows-only.

 

Rowley works on Linux but does not know recent chips or debuggers.

Microchip MPLABX runs on Linux.   Debugging is a bit clunky.   Hopefully,  it will improve.

 

Eclipse for ARM is pretty horrible.   At least when I last attempted.    It may have improved by now.

The AVR market is small.   But there are plenty of ARM users throughout the world.   Both professional and hobbyist.

 

I would give Eclipse a fair trial on Windows if there was an "install and go" and a personal recommendation from AvrFreaks member.

In which case I would be fairly confident that it would have a similar behaviour on Linux.

If developing AVR projects is your professional job,   just BUY a Windows PC and run AS7.0

 

David.


Yes I am doing it professionally, but only on Linux setup.
So I have to make it work in Linux.
clawson sorry for the cross posting, maybe separate topics for Linux and Windows should be made, as this seems to be different worlds.
As I said, I can compile and flash no problem in eclipse under Linux, I will check if anybody succeeded also to debug .
And if I find it or do it myself I will post how to do it

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

Seriously.  There is no contest.

 

If your employer is paying your salary,  she should buy the appropriate tools.   And a secondhand Windows PC will be 2-3 hours of your time.

 

Paying an employee to be unproductive is crazy.   Especially when a s/h PC is either free or cheap.

 

As a hobbyist I am horrified by the cost of Keil,  IAR, Rowley, ...

But would buy the licences for any professional work.

 

I am sure that there are members who use Eclipse on Linux.   Not just for compiling but full hardware debugging.

If you waste 2-3 hours of your employer's time with a buggy Eclipse,   the Windoze PC would be a wiser route.

 

As a hobbyist,  I would love to see a recommendation from an Eclipse user.   (Linux or Windows)

 

David.

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

I have been following this thread but have not commented up to this point because my environment is different and older (i.e. Window XP, WinAVR, Dragon, etc) However, there may be something in https://www.avrfreaks.net/forum/... which might be helpful.

 

Alan

 

added: you might want to search AVRFreaks using the terms: "Debugging in Eclipse success".  I found hits which might apply to your environment.

also updated URL

Last Edited: Thu. Nov 14, 2019 - 01:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

Pages