atxmega128a1 development support under Linux?

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

I hope someone has some good news for me... I just invested quite a bit in 100+ Xmega rev H MCUs and 4-layer boards with Ethernet, Audio, SRAM, etc. My application required 3 separate SPI ports, low power consumption, so seemed like a perfect solution.

It appeared that everything was in order. I was able to compile the sample code with avr-gcc, The documentation is really looking good. Everything was going great until I actually hooked up the Dragon programmer via JTAG to the first proto board assembly and realized that the -pxmega128a1 option in avrdude is not actually supported (it is present though). I don't know of any other options for programming these devices under Linux.

After searching around on google, it appears that the avrdude support is incomplete right now due to lack of information on the JTAG protocol for programming. It appears that somebody was nice enough to supply patches for partial support, but not enough to be usable yet.

Anyone have word on if Atmel is going to help those of us who develop under Linux? AVR Studio is not an option for me at this time as I do not have any Windows experience.

Any constructive advice greatly appreciated... no need to lecture me for trying to be an early supporter. I know I jumped the gun here.

There might be a nice new XMega dev board for someone who can help me get this thing working under Linux...

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

Your first problem is not avrdude but the Dragon. Nowhere in the Dragon documentation it says it supports the xmegas.

So if this is for serious business you'd probably have to bite the bullet and invest some more money into

* A programmer that actually supports xmegas. Got to Atmel's web site to see the officially supported programmers.

* A Windows PC or at least a copy of Windows. Yes, Windows is sh*t, I write this on a Linux machine for a reason. But to be on the safe side and rescue what can be rescued of your project/investment get a used Windows XP PC, a cheap Dell or whatever.

Of course, if you aren't serious about your business, your project or your investment you could try one of the official xmega programmers with avrdude, hoping that it does support programming of xmegas via JTAG. But can you afford to waste time on this? And is your time less expensive than a real programmer and a Windows PC?

Stealing Proteus doesn't make you an engineer.

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

The "cheap" option for programming Xmega's is the $34 AVRISPmkII which can now do PDI.

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

AVRISP mk II as Cliff suggests, with Atmel's programming software running under Wine. I don't know for sure that it will work under Wine, but it will be cheap for you to find out compared to the cost of your 100 boards. You probably won't succeed using the Dragon because it is deliberately limited to the lower memory devices - it doesn't support any 128k chips as far as I know.

Michael

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

Why get involved with wine? (while I know it runs Studio well I'm not so sure about the external connection to USB devices such as AVRISPmkII)

avrdude makes (one) mention of PDI in the manual so I take it that it knows how to do PDI (admittedly the mention is ONLY against the stk600 protocol)

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

mcollas wrote:
You probably won't succeed using the Dragon because it is deliberately limited to the lower memory devices - it doesn't support any 128k chips as far as I know.

Michael

For programming purposes, which is what the OP is asking about, the Dragon officially supports every currently in-production "conventional" ATmega device, as well as most other in-production "conventional" AVRs which use JTAG, ISP, HVPP, or HVSP, with no memory limit.

The memory limit only comes into play for debugging purposes.

But Atmel doesn't list any form of official support for working with Xmega devices using the Dragon, regardless of memory size.

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

With all your investment is parts and boards, I strongly recommend purchasing the JTAGICE mkII instead of the ISP mkII. The JTAG interface is faster than ISP; transferring code and debugging on a 128 K device will make that useful.

Granted the JTAGICE mkII is ~US$300, but we are happy with it. And it should be supported under avrdude.

Check out the sticky at the top of the AVR-GCC forum for instructions on compiling the latest AVR-GCC toolset under Ubuntu (YMMV with other distros).

As far as "IDE" goes, there is some effort to support Eclipse, and I know there are threads on this under the AVR-GCC forum. The gdb debugger is available, although I have never used it so i don't know its capabilities or downfalls.

Finally, be sure to read the Errata at the end of the 128A1 datasheet so you don't run afoul of known defects in the chip.

Rock on!

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

Quote:

Granted the JTAGICE mkII is ~US$300,

No it isn't - the current deal means you can get it for a quite acceptable $149 ;-)

(NOW is the time to buy - the deal/stock may not last forever)

https://www.avrfreaks.net/index.p...

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

Everyone,

Thanks for the responses. I have one of the $149 JTAGICE mkii programmers on the way. Hope I can convince avrdude to program an XMega with it. This will be my 5th unique programmer purchase for AVRs. The Dragon has been working well for me using the ATMega1281 processor. I knew that the Dragon only supported emulation for small devices, but I'm pretty sure I saw reference to *jtag programming* XMega support for it somewhere... It certainly appears that I would have been much better off just buying the AVRJTAGICE mkii in the first place.

I'll post results when I have some.

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

lfmorrison wrote:
mcollas wrote:
You probably won't succeed using the Dragon because it is deliberately limited to the lower memory devices - it doesn't support any 128k chips as far as I know.

Michael

For programming purposes, which is what the OP is asking about, the Dragon officially supports every currently in-production "conventional" ATmega device, as well as most other in-production "conventional" AVRs which use JTAG, ISP, HVPP, or HVSP, with no memory limit.

The memory limit only comes into play for debugging purposes.

But Atmel doesn't list any form of official support for working with Xmega devices using the Dragon, regardless of memory size.

Thanks for the correction - that's good to know.

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

The JTAGICE mkii programmer showed up today. Same results as the Dragon programmer. The ATXMEGA128A1 is not supported with avrdude because the XMega programming protocol is apparently not publicly documented.

Here is Eric Weddington's response to someone with the same problem I am having.

http://www.mail-archive.com/avrd...

If someone from Atmel is reading, please consider helping out the avrdude project with some information on the XMega programming protocol. I'm willing to take a shot at adding support if someone provides me with the info needed.

I'm thinking my only option right now is to get a minimal bootloader up and running on the xmega with avrstudio to support code development under Linux.

Thanks for all the responses anyway. I'll update this thread if I make any progress.

I am willing to send one new dev board (assuming it works) to the first person that can help me get avrdude working with the xmega under Linux

Here is more info on the dev boards I'm working on
http://valhalla-wireless.com/

Thanks for all the suggestions.

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

Quote:

If someone from Atmel is reading, please consider helping out the avrdude project with some information on the XMega programming protocol. I'm willing to take a shot at adding support if someone provides me with the info needed.

I'd drop a PM to Joerg about this if I was you. (actually forget the PM - his sig line says he prefers email)