I'm pondering taking a new stab (far-fetched pun intended) on finding a complete development environment for AVRs other than Atmel Studio. The critical thing is on-chip debugging. The goal is to move away from Windows before the only viable Windows-alternative is the dreaded Windows 10.
I'm thinking of this as a multi-stage rocket. To begin with I will work on Windows to have a setup that does not rely on Studio, but will use things that came with the Studio install (toolchain, system libs and headers...).
My IDE of choice to begin with will likely be NetBeans. I already have it working with the C compiler targeting Windows (i.e. to write programs that executes on Windows). I am confident I will get it working with the Atmel toolchain that came with Atmel Studio.
Programming/debugging hardware will be an Atmel-ICE (and, if that is too new for AVRDUDE, then I can fall back to a Dragon).
1. Get NetBeans working with the toolchain from the Studio install to build an ELF.
2. Convince NetBeans to create the Intel Hex file from the ELF.
3. I am content with running AVRDUDE from the command line to begin with.
4. Get a debugging stack running, with ATBACKEND as the "driver" for the Atmel-ICE. I'm hoping to be able to connect to a target system running code downloaded with AVRDUDE. (This is, of-course an intermediary solution.)
5. Get the same debugging stack running with AVARICE as the driver. Possible sub-steps:
5a) Get GDB-AVARICE-AtmelICE-target working. Check with simple GDB commands.
5b) Get NetBeans to talk to the stack from 5a.
6. Flash programming as first step of debugging session: Get AVARICE to program the firmware when starting a debug session.
7. Explore actual debugging possibilities with this setup. How do you watch a variable? A SFR? Breakpoints. Stepping. Etc etc..
Once this is working, I might consider moving from Windows to GNU/Linux. At this stage I'm hoping to be familiar with the ins and outs of setting up the stack, and what I can expect of the debugging experience.
The subject has been raised many times here at AVRfreaks, several times by me. I have done some searches for previous threads and found some of them, but not all. I am convinced there was a thread where someone described, in detail, how to set this up, but I'm stumped trying to locate it again.
Any hands-on info on how to go about this, explanations on how such a debug stack actually fits together (roles, parameters, ports talked on, etc etc) will be gratefully accepted!
I have lost an old list of links to relevant threads on the subject. If anyone has links that are not in my list below, I'm happy if you post them.
War-cry: No Windows 10 for me!! I can gladly accept that the debugging experience will not be as "smooth" as in Atmel Studio, if that is what it takes to avoid Windows 10.
Promise: If I get this working in any reasonable way I promise I will write and publish a guide/howto on the subject for others to prosper from.
Any advice or hard facts that will help me conquer this beast is welcome!
[Grovel version: Help! Please...]
APPENDIX - Some previous threads
For any-ones reference, below is a bunch of threads I've found.
<resume, notes etc>
2014-10-03 johanekdahl (me!)
Atmel AVR 8-bitters debugging and GDB
Where I ask questions about how to run a debugging session with GDB, and Morten gives some sweeping "politically correct" answers. [Morten, please don't take that as offensive! I fully understand the position you're in ;-) ]
Where mojo-chan and clawson has an interesting discussion on debugging on Linux with a stack like <Some IDE> - <avr-gdb> - <avarice> - <debug dongle> - <target AVR>. I chime in with some brou-ha-ha.
Then Morten mentions a "debug adapter for Visual Studio Code". VSC can run on other platforms than Windows, but the "debug adapter" only talks to atbackend so that seems to be a dead end for Linux. (Besides, I'm after something that plugs into any of the cross-platform IDES like Eclipse, NetBeans, CodeBlocks...)
THere are hints of a Linux build of atbackend being built and existing inside Atmel/Microchip, but again (fully understandably) Morten is secretive.
Morten then goes into specifics about the atbackend "upwards" protocol - its based on TCF (an open Eclipse standard - http://www.eclipse.org/tcf/ ). I'm not sure what to make out of that. Yet..
Atmel-ICE, avarice, Eclipse and debugging in Ubuntu
sq5rix has built AVARICE on GNU/Linux, and got the connection between AVARICE and GDB working. He then runs Eclipse but fails to start a debugging session. I have not dug into what he's experiencing - I'm just to inexperienced with this to "get it".
PDF: Howto develop AVR programs using the Code:Blocks IDE
I'm sure that there is a link to this PDF in some thread, but have not been able to locate it...
And I have still to read it.
debugging with winAVR?
An older discussion where debugging is touched upon. INcluded here just because Cliff uses the term "Porcine aviation" which I find wonderful.. ;-)
AVR GCC Debug in Eclipse
In post #28 I (!) claim to have a stack of <GDB>-<AVARICE>-<Dragon> up and running. I have no memory whatsoever about doing that! (But can see no point in lying about it so I suppose it's true - this was shortly after I did some work on LuminaryStellaris, and wrestled with integrating OpenOCD and GDB in a stack beneath Eclipse, so I might have known something then that I've forgotten by now..) In the post I speculate about using stuff from the WinAVR distribution, so no good way forward now..
2011-08-31 johanekdahl (me!)
Anyone actually using AVaRice?
A rather old thread, talking about using stuff in WinAVR. Not a path to go down now...
AVR eclipse linux hw debug
An attempt at <Eclipse>-<GDB>-<AVARICE>-<Dragon> . Fails in Eclipse "at 97%"..
Debugging Atmega128 in NetBeans IDE
Asking about debugging using NetBeans.
I answer in general terms. Comes to nothing..
Debugging with Dragon in Eclipse under Debian 8
Paul asks the eternal question. Does not come to anything specific..
debugging SAM D21 with gdb / openocd
Talks about debugging SAM D21 using OPENOCD. Not re AVRs as such, but included here as it might hint to the general structure of the "stack setup".
Debugging with AVR plugin for Eclipse
Claims successful - using "AVR plugin for Eclipse". See http://avr-eclipse.sourceforge.n... ! A detailed description of involved software and setup.
I have still to read this in detail..
END OF LIST