Atmel AVR 8-bitters debugging and GDB

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

In this thread Morten wrote

 

for those following gdb should know that there has been quite a bit of development on it lately (ref the GCC caudron this year)

I fully admit that I have not "followed GDB", but I am very interested.

 

Especially if there is in sight a stable and sort-of-supported way to on-chip debug 8-bit AVRs on a host system other than Windows.

 

A few years back I surveyed the lands of OpenOCD and GDB but deemed it to swampy for me. It seemed just a bit to works/works-not/works-perhaps to spend what I estimated to be A LOT of time to dig out all the details, pretty and ugly.

 

Now Morten even says you could enable GDB in Atmel Studio... (Perhaps still not as good as the default, whatever that involves - but still an indicator that things might evolve in what I think is the right direction.)

 

I have questions:

 

1. If "GDB is enabled in Atmnel Studio", what would be the actual "stack"? Studio-GDB-<SomethingHere?>-IceHardwareDongle-AVR? What would the SomethingHere be?

 

2. Is the SomethingHere, if existing - I'm thinking the "backend" - still tied hard to Windows? Or is it something that Atmel in it's infinite goodness might eventually to incorporate into the Toolchain for Linux? The perfect answer is of-course: "We're working on it right now, release in November" ;-)

 

I'm sure there will be lots more to wonder about as this thread (hopefully) goes along, but I'll stop there, have another kick of aspirin and sleep another hour..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Sounds almost like a personal question smiley

 

GDB is used, as you maybe know by default for ARM from 6.2 and forwards. That's why callstack and other nice things suddenly started to be a bit more useful (breakpoint in inlined function is also a long standing issue).

 

There have been moves on GDB for avr8 as well, but it still struggles a bit with run control as far as I remember. Pierre from embecosm had a session at the couldron with some of the issues that are being worked on.

 

1. If "GDB is enabled in Atmnel Studio", what would be the actual "stack"? Studio-GDB-<SomethingHere?>-IceHardwareDongle-AVR? What would the SomethingHere be?

As for ARM, setting this flag means that (check your task manager while debugging arm...) the toolchain gdb executable is loaded by what is fondly known as the backend of studio. This will then take responsibility for expression evaluation and high level control of the debug session. This is needed to get the benefit of the expression evaluation and breakpoint handling. 

 

However, as with avarice, there needs to be another hardware abstraction to this. Thats why I say loaded by, as it is not part of a chain, but used as a component inside the backend.

 

2. Is the SomethingHere, if existing - I'm thinking the "backend" - still tied hard to Windows? Or is it something that Atmel in it's infinite goodness might eventually to incorporate into the Toolchain for Linux? The perfect answer is of-course: "We're working on it right now, release in November" ;-)

Do you really think that someone with 'Atmel' in their signature is going to touch that beehive :) I can guarantee that it will not be part of the toolchain for linux, since that's a toolchain (yes, I know winavr had much linux goodness, but it went far beyond what is a toolchain), and there's a lot of hair splitting w.r.t toolchain, shellutils, coreutils +++. I can also guarantee that we will not release in November, since it is fucking cold in Trondheim then smiley

 

 

--= Edit =--

I have to say I'm a bit surprised about your arousal... The option has been there since 6.2 which I guess was in February. 

 

Maybe I should do a AMA or something here, just to let the floodgates open... 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

Last Edited: Fri. Oct 3, 2014 - 05:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meolsen wrote:
There have been moves on GDB for avr8 as well, ...
fyi, AdaCore has GDB for AVR GCC 4.5

Though it's Ada a typical Ada compiler will be configured and built to add C; AVR-Ada adds C++.

AdaCore's Libre presents the source code though the OOTB experience is for Windows.

IIRC AdaCore uses mingw to get to Windows.

AVR-Ada is moving to GCC 4.9 but GDB is not along for the ride if I read a repository correctly.

Welcome to Adaino project

Adaino is a toolset written in Ada, to develop Ada applications on Arduinos on a host Windows machine.

...

Using the Atmel mkII debugger to Arduino Mega

https://github.com/pvrego/adaino#using-the-atmel-mkii-debugger-to-arduino-mega

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

Last Edited: Fri. Oct 3, 2014 - 06:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That looks cool :)

 

I have mostly used gnat to do some exercises while at UNI, to demonstrate safety-critical systems and system behavioural analysis.

 

Strange to hear that GDB is not following the move to 4.9 for ada... I would have thought that that was quite an important part of the puzzle, even for the arduino guys :)

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

I admit that I didn't get much of what you said there, Morten. I am by no means an expert on these things. What follows might reveal approximately where I am so let's chew off some stuff..

GDB is used, as you maybe know by default for ARM from 6.2 and forwards.

No, I didn't have a clue. ARM has not been, and for the time being isn't, a serious interest for me. (The closest I might come in the foreseeable future would be to perhaps have a wrestle with the "R21" , but not likely.)

 

the toolchain gdb executable is loaded by what is fondly known as the backend of studio. This will then take responsibility for expression evaluation and high level control of the debug session

I think I get that part of the picture.

 

As a side note I several years ago had a both enlightening and quite frustrating experience trying to get a complete GCC toochain, including programming and debugging, going for a evaluation kit from one of Atmels competitors. The complete shebang was more or less ("top to bottom")

 

  • IDE (played with both NetBeans and Eclipse)
  • GDB-plugin for the IDE
  • GDB
  • OpenOCD
  • JTAG hardware
  • ARM micro-controller

 

I had potential professional/educational use for this, but I never got this stable and "streamlined" enough to put it in the hands of students/course-participants. Still, I learned a lot and have ever since thought that if only a stable and tried component in the position of OpenOCD was available we could get a nice IDE'd environment for AVR8's on other systems other than Windoze.

 

My naive view looks something like this:

 

1. Stable cross-platforms like Eclipse or NetBeans have excellent integration/cooperation with GDB (through a GDB plugin, if my memory serves me).

 

2. If Atmel Studio can use GDB then it must have "something" below GDB corresponding to OpenOCD in the Lumin.. (oopps! BEEP!) stack I sketched above.

 

3. Unless the developers of 2. are really mad, then that "something" is coded in C or C++, and it might just be quite portable. Upwards it talks to the same GDB interface, downwards it talks to the same Atmel OCD hardware.

 

4. Difference might be in driving the physical interface (typically USB) to the OCD hardware.

 

5. In my blue dreams the Good People Of Atmel would build a Linux binary and all would be well. No source. No revelation of the proprietary stuff. A few notes on what GDB version it is compatible with, and leave the rest to the tinkerers. Or to someone wanting to put together a complete setup and perhaps charge for it, in which case you would be dealing with a professional/business and could get the NDAs to be able to sue them to hell if they leaked anything ;-)

 

My interest is purely as a serious tinkerer. And as someone that for my tinkerers needs have more or less one clamp around the leg tying me to Windoze. That clamp is Atmel Studio.

 

As far as I have come the situation for developing on Linux is

  • I can either handle the build process by makefiles I write myself, or (if available) a decent plugin for my favourite cross-platform IDE. I am comfortable with either.
  • I can program flash etc with AVRDUDE.

but...

  • I've been running those fancy debugging environments (that some despise) 30 years now, and have a hard time coping without them (they've been with me since the VAX/VMS DEBUG and Turbo Pascal of the mid 1980's..).

 

If any discussion regarding this inevitably reveals more about what goes on behind the scenes in Atmel Studio than Atmel wants to reveal, I will of-course respect a "no comments" from you.

 

Seriously: Am I just dreaming?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

meolsen wrote:
Strange to hear that GDB is not following the move to 4.9 for ada... I would have thought that that was quite an important part of the puzzle, even for the arduino guys :)
For clarity, Ada is in GDB and there are recent GDB corrections for AVR; it's AVR-Ada that does not build an AVR GDB.

Relative to a debugger, Ada, and my usage its only for when unit tests or integration tests fail and I'm at a loss for why.

Debugging with GDB

15.4 Supported Languages

15.4.9 Ada

https://sourceware.org/gdb/current/onlinedocs/gdb/Ada.html#Ada

 GDB News

https://www.gnu.org/software/gdb/news/

search for AVR

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

Last Edited: Fri. Oct 3, 2014 - 07:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seriously: Am I just dreaming?

Serious dreaming perhaps?

 

As you say, I'm not that ... comfortable ... going into details here. I have noe idea what the high lords in the US declares as secret, and having read my own contract I'm not going to strecth itsmiley

 

1. Stable cross-platforms like Eclipse or NetBeans have excellent integration/cooperation with GDB (through a GDB plugin, if my memory serves me).

That's the normal way of doing it, yes. Usually eclipse and other use something called GDB MI to communicate the the gdb process (MI=Machine Interface?)

2. If Atmel Studio can use GDB then it must have "something" below GDB corresponding to OpenOCD in the Lumin.. (oopps! BEEP!) stack I sketched above.

Wrong. Atmel Studio (aka isolated shell) does not natively do anything with gdb (of course). However, as I might have mentioned, Atmel Studio is a decoupled environment with a frontend (vs isoshell) and a backend. Another 'frontend' is atprogram, which hook onto the backend in exactly the same fashion as Atmel Studio does. The protocol used here is a open protocol specified by the Eclipse Foundation called Target Communication Framework, or TCF. The only thing the 'use gdb' flags in Atmel Studio does is send a couple of parameters to the backend when it is launching a debug session, telling it to load gdb into the mix as it pleases. There are no change otherwise.

 

I'm having some problems explaining this change without blurping out the internal structure of the backend, so it might seem far less intuitive than it issmiley

 

The backend in itself has multiple 'api' layers inside it, each coping with different parts that is needed, for all the architectures etc that is supported. So, in this context, gdb is helping our backend when studio asks; what is the value of R24, set a breakpoint at main.c:23, evaluate *p + 1, step into function foo, unwind the callstack from here etc. gdb does a better job at some of these operations as it is following all the tricks of gcc, and it uses most of the dwarf information available and it has knowledge that has been fine tuned for many years (callstack unwinding, I have seldom seen more horrible, beatuiful and magic code than some of the things there). However, gdb is(was..) made for a von neuman style processors. So it has a bit of struggles (same as with gcc, but easier to see) with harvard. Also, it usually works a bit more reliably when there's an os in the bottom fixing things, although it is used heavily on embedded. 

 

3. Unless the developers of 2. are really mad, then that "something" is coded in C or C++, and it might just be quite portable. Upwards it talks to the same GDB interface, downwards it talks to the same Atmel OCD hardware.

As in 2, not upwards. And yes, we are quite mad, but not stupid... (I tend to take mad as a compliment)

4. Difference might be in driving the physical interface (typically USB) to the OCD hardware.

You would be amazed at how much more complicated things are, especially with 3 architectures to support.

5. In my blue dreams the Good People Of Atmel would build a Linux binary and all would be well. No source. No revelation of the proprietary stuff. A few notes on what GDB version it is compatible with, and leave the rest to the tinkerers. Or to someone wanting to put together a complete setup and perhaps charge for it, in which case you would be dealing with a professional/business and could get the NDAs to be able to sue them to hell if they leaked anything ;-)

We have our priorities, based partly on what we want to do to drive the ecosystem forward, partly what the rest of the organisation is doing, partly what marketing tells us (yes, that survey that went out in the 6.0 days are still being read), and partly what we see as beneficial for our users, which is either through support, through customer contact, through sites such as freaks, and the list goes on and on. Last I heard the wish list for 2015 would take about 6 years to complete with our current resource situation, so of course things are being dropped, push to future etc. However I, personally, think that there are some new winds that have started and hopefully will continue to blow, such as our stronger comittment to gcc, libc, upstream, the opening up edbg protocol etc. All of these things are of course to little to late in your opinion, but at least things are happening (even I had a line in the last avr-libc changelog).

 

You mentioned openOCD, and we have been involved there as well, getting at least some of the xpro kits working with openOCD. I was just briefly involved last winter, so not sure how things are going there.

My interest is purely as a serious tinkerer. And as someone that for my tinkerers needs have more or less one clamp around the leg tying me to Windoze. That clamp is Atmel Studio.

I have no problem seeing that point. As you know, I don't run windows except at work. But, and there is a big but here, and that is the boring fact that windows still has majority, so supporting windows is the first priority. There are of course questions about linux, especially for production lines etc, but there haven't been enough demand to make that issue rise to the top of the list.

 

I see that things are getting a bit cheesy as I'm getting drunk, so I think I'll stop my short novel here.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Makes sense. I couldn't get my head around why ada was not in gdbsmiley

 

I guess ada is one of the languages that comes closest to not needing a debugger by design.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

JohanEkdahl wrote:
As a side note I several years ago had a both enlightening and quite frustrating experience trying to get a complete GCC toochain, including programming and debugging, going for a evaluation kit from one of Atmels competitors. The complete shebang was more or less ("top to bottom")

 

  • IDE (played with both NetBeans and Eclipse)
  • GDB-plugin for the IDE
  • GDB
  • OpenOCD
  • JTAG hardware
  • ARM micro-controller

 

I had potential professional/educational use for this, but I never got this stable and "streamlined" enough to put it in the hands of students/course-participants.

As a side to your side wink

Brutte got most of this working on a competitor's Cortex-M, minus OpenOCD and SWD instead of JTAG, except on Windows.

EDIT: Here it is, a GDB session of Ada/Ravenscar running on STM32 under Eclipse (windoze version).

https://www.avrfreaks.net/comment/1257701#comment-1257701

Hope Brutte will jump in.

Would be interesting to try this on an Atmel Cortex-M Xplained Pro.

JohanEkdahl wrote:
Still, I learned a lot and have ever since thought that if only a stable and tried component in the position of OpenOCD was available we could get a nice IDE'd environment for AVR8's on other systems other than Windoze.
I like your drift.

The 9USD (9 Euros Farnell element14) mega328P from Atmel with an Atmel EDBG debugger on-board begs for more support for students.

Atmel Store

Atmel ATmega328P Xplained Mini

http://store.atmel.com/PartDetail.aspx?q=p:10500392;c:100113

Nederland Farnell

ATMEL - ATMEGA328P-XMINI - EVAL BRD, ATMEGA328 INTEGRATED DEBUGGER

http://nl.farnell.com/jsp/displayProduct.jsp?sku=2407174&CMP=GRHB-FINDCHIPS-1000082&CIC=nl

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

Last Edited: Fri. Oct 3, 2014 - 09:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

Last Edited: Fri. Oct 3, 2014 - 09:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jöerg never fails to impress me.

I think it is based on this: http://www.atmel.com/webdoc/prot...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

I see that things are getting a bit cheesy as I'm getting drunk

LOL! Have a good one! I allowed myself one glass of red, since more would worsen the cold more than it would better my mood.

 

Thank you for the reply, and let's stop here for the time being. Alcohol and NDA material should not mix.

 

Anyway, I see that I need to remain a dreamer for the time being. Might be time to virtualize the Windoze installation then.. Only problem is I need to get a hotter laptop or I might as well book my funeral while booting. Or start also carrying around a NUC i5 w/ 16 GB running ESXi or some such - yes, the Gear Acquisition Syndrome plagues me..

 

 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Be mad at us and use that as an excuse to upgrade then...

Yeah, difficult to know where the nda line goes, so I try to play it conservatively. Have a nice weekend, I'm leaving for the mountains.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

gchapman wrote:

Nederland Farnell

ATMEL - ATMEGA328P-XMINI - EVAL BRD, ATMEGA328 INTEGRATED DEBUGGER

http://nl.farnell.com/jsp/displayProduct.jsp?sku=2407174&CMP=GRHB-FINDCHIPS-1000082&CIC=nl

 

Ah-ha.    I wondered when / if they would ever do the Atmel version of FRDM/NUCLEO.

 

What seems fascinating is that they have the EDBG running on a m32u4 !

Freescale and ST use at least 128kB Cortex-M3 to implement their CMSIS-DAP debuggers.

 

Even the Dragon uses 128kB chips for its firmware.

 

I will order an XMINI from Farnell.    Just to see how fast / smooth the debugWIRE experience is compared with Dragon /JTAGICE-2.

And perhaps order a NUCLEO-L053 as a low-power comparison.

 

What MCU is used in the JTAGICE-3 or the ATMEL-ICE ?

I had assumed it would be a UC32 or a Cortex.    Both being a lot more powerful than a m32u4.

 

David.

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

david.prentice wrote:
What MCU is used in the JTAGICE-3 or the ATMEL-ICE ?
AVR32 UC3A4

Atmel Store

Atmel -ICE

http://store.atmel.com/PartDetail.aspx?q=p:10500375;c:100112#tc:relateddoc

page 26

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

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

JohanEkdahl wrote:
1. Stable cross-platforms like Eclipse or NetBeans have excellent integration/cooperation with GDB ...
Also Code::Blocks.

Highlights:

  • Open Source! GPLv3, no hidden costs.
  • Cross-platform. Runs on Linux, Mac, Windows (uses wxWidgets).

...

Debugger:

  • Interfaces GNU GDB

...

http://www.codeblocks.org/features

Em::Blocks has an AVR GDB.

Em::Blocks

Release 2.20 download

http://www.emblocks.org/forum/viewtopic.php?f=1&t=37

Changes 2.00
...
- Mod: GDB 7.7 is now used as debugger version

...

Changes Beta 2.00:
- The first version with the EmBlocks GDB debugger (Example projects included)
- ARM, AVR and MIPS EmBlocks GDBs debuggers included.

...

Em::Blocks currently runs on Windows though the Em::Blocks creator states

But in the future we must switch to linux because I think that microsoft will become more and more a tablet OS.

Em::BLOCKS for Linux?

http://www.emblocks.org/forum/viewtopic.php?f=1&t=83

though a very recent Microsoft media event for Windows 10 (arrives late 2015) indicates it'll be more business desktop friendly.

Microsoft unveils Windows 10: ten things to know

by Samuel Gibbs (Guardian, Wednesday 1 October 2014)

http://www.theguardian.com/technology/2014/oct/01/windows-10-start-menu-nine-other-things-to-know

Microsoft hopes Windows 10 will bring users back and entice businesses to ditch the four-year-old Windows 7, seven-year-old Windows Vista and the now-discontinued 13-year-old Windows XP.

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

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

JohanEkdahl wrote:
My interest is purely as a serious tinkerer. And as someone that for my tinkerers needs have more or less one clamp around the leg tying me to Windoze.
That may have also driven the tinkerers at Canberra's MakeHackVoid to create the MHV AVR toolchain.

MHV AVR has received a new brand as Inferno Embedded AVR Tools.

It's a cross platform AVR toolchain that contains AVR GDB and can be integrated with AVR-Eclipse.

Inferno Embedded

AVR Tools

https://infernoembedded.com/products/avr-tools

http://makehackvoid.com/ 

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

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

gchapman wrote:

 

david.prentice wrote:

What MCU is used in the JTAGICE-3 or the ATMEL-ICE ?

AVR32 UC3A4

 

Atmel Store

Atmel -ICE

http://store.atmel.com/PartDetail.aspx?q=p:10500375;c:100112#tc:relateddoc

page 26

So it is a 32-bit MCU with 128kB of RAM and presumably > 512kB Flash.    i.e. a different league to a m32u4  (2.5kB RAM and 32kB Flash) !

 

Anyway,    I was looking through Farnell to see what I could order with the XMINI.

Nothing from Atmel compares with Freescale, ST or NXP.

So far,   the NXP LPCXpresso11U68 is attractive.     (I already have Freescale and ST).

 

It would be nice to have something with onboard debugger and Arduino footprint.

But since I have ARM debuggers,    I don't mind using an external J-Link.

 

The ARM Cortex MCUs from different manufacturers compete on the quality / performance of their peripherals.

And the ease / convenience of the software Tools.     It would be interesting to compare AS6 with Keil and Rowley.

However since AS6 only supports Atmel,    I need an Atmel target.

 

David.

Last Edited: Sat. Oct 4, 2014 - 07:41 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What seems fascinating is that they have the EDBG running on a m32u4 !

It's the Xplained Mini, and the debugger is a mEDBG, so not a full EDBG. a m32 would not be able to do everything that the uc3 does, but it is able to do normal debugging and cdc forwarding.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

I can think of several combinations:

1.   UNO debugWIRE with a Dragon

2.   UNO debugWIRE with a JTAGICE-mkII

3.   UNO debugWIRE with a ATMEL-ICE

4.   Xplained Mini debugWIRe with its onboard mEDBG.

 

Perhaps Morten might 'guess' at the performance differences.

 

I only possess (1) and (2).    But would quite happily purchase an ATMEL-ICE or XMINI if they are better.

Likewise,   I would like to evaluate Atmel Cortex-M0.

 

I suppose that I could try a DUE clone with an external J-Link.    However,   this is a M3.

 

David.

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

JohanEkdahl wrote:
1. Stable cross-platforms like Eclipse ...
Appears to be close for C by

Arduino uno atmega328p Eclipse project with debug for AVR Dragon settings

https://github.com/Lahorde/arduino_avr_template_avr_plugin

via

https://www.avrfreaks.net/forum/avrdragon-debugwire-atmega328p-nice-unusable

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

Last Edited: Sat. Oct 11, 2014 - 02:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

As a side note I several years ago had a both enlightening and quite frustrating experience trying to get a complete GCC toochain, including programming and debugging, going for a evaluation kit from one of Atmels competitors. The complete shebang was more or less ("top to bottom")

 

  • IDE (played with both NetBeans and Eclipse)
  • GDB-plugin for the IDE
  • GDB
  • OpenOCD
  • JTAG hardware
  • ARM micro-controller

 

I had potential professional/educational use for this, but I never got this stable and "streamlined" enough to put it in the hands of students/course-participants.

GNU ARM Eclipse

A family of Eclipse CDT extensions for GNU ARM development

About
http://gnuarmeclipse.livius.net/blog/about/

...

In February 2014, the version 2.x of the plug-ins family was published, bringing official debugging support, via SEGGER J-Link and OpenOCD.

GNU ARM Eclipse

Debugging

http://gnuarmeclipse.livius.net/blog/debugging/

In short, for bare metal embedded development, we highly recommend solutions that can be used on all major platforms (Windows, OS X and GNU/Linux), with hardware probes that implement the SWD protocol and support tracing via the SWO pin. The preferred probes that match the above requirements are J-Link EDU/J-Link, from SEGGER.

...

Another way to Eclipse and ARM is via ARM DS-5 Community Edition.

Home > Products > Microcontrollers > SMART ARM-based MCUs > SAMA5 MPUs

SAMA5D4 Software Package

http://www.atmel.com/tools/SAMA5D4SOFTWAREPACKAGE.aspx

...

SAMA5D4 GNU Software Package 1.1

SAMA5D4 GNU Software Package 1.1
(20.5 MB, updated October 2014)
This package provides software drivers and libraries to build any application for SAMA5D4 devices.

...

SAMA5D4 Software Package 1.1 Release Notes
(file size: 7.84 KB, revision 1.0, updated: 10/2014)

http://www.atmel.com/Images/sama5d4x_softpack_release_note.txt

Release Notes - SAMA5D4x Software Package
------------------------------------------
Release version: 1.1
Release date: 2014-10

...

2.3 Port softpack to Eclipse
It is easy to port examples in softpack CodeSourcery to Eclipse.
 - Install DS-5 CE from http://www.arm.com/products/tools/software-tools/ds-5/community-edition/ds-5-community-edition-install.php
 - Install gunarm tool chain from http://gnuarmeclipse.sourceforge.net/updates
Please refer to documentation\MigrationFromCStoEclipse.txt for more detail information.

 /Atmel/sama5d4x-ek/documentation/MigrationFromCStoEclipse.txt

...

Create, manage and run configurations
-------------------------------------

...

 - Switch tab to 'Debugger'
 - Select 'gdbserver' in debugger drop down list.
 - Configure connection
   - Click connection tab in debug option window.
   - Select 'TCP' in connection type drop down list.
   - Type 'localhost' for host name.
   - Type '2331' for port number.
 - Configure main option
   - Switch to 'main' tab
   - Select GDB debugger by clicking 'Browse..' button
     For example, select '[INSTDIR]\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-gdb.exe'
   - Select GDB command by clicking 'Browse..' button
     For example, '[SOFTPACK INSTDIR]\libraries\libboard_sama5d3x-ek\resources\gcc\sama5d3x-ek-ddram-eclipse.gdb'
   - Select 'standard' in GDB command set drop down list.
   - Select 'mi' in protocol drop down list.

   
3. Run configuration
 - Select project in project explorer list.
 - Click 'Run'->'Debug Configuration...'
 - Select project by clicking 'project' ->'Browse..' button.
 - Select a application by clicking 'C/C++ Application'->'Browse..' button.
   For example to configure getting-started application.
   Select file bin\getting-started_sama5d3x_ek_sama5d3x-ddram.elf  
 - Switch tab to 'Debug'
 - Click 'run' button to start debug.

Note that this is bare (no Linux, no RTOS); GDB messages are likely via the EK's Ethernet.

One wonders if ARM is moving all (Linux, RTOS, bare) to DS-5.

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