Go Down

Topic: Atxmega Series development (Read 3172 times) previous topic - next topic

000

Hi,
I was thinking on the lines on why there wasn't any rush for arduino compatible Atxmega series of boards like Atxmega128a3u?(Is it due to Arduino Due?)
I was wondeing whether I could give it a go on this for the next couple of months.  I started googling and found this item. Seems that someone has already worked on this.

http://www.obdiiworld.com/xaduino/Xaduino-Manual.pdf
http://www.ebay.com/itm/2012-new-Renault-CAN-Clip-newest-version-V120-lowest-price-/180922744611

So my question is how is this developed? I mean how do you go about porting a new series of chips to arduino compatible ones? Can anyone shed any light on this issue? Because I would like to go down to the details on how this is being done. What are the steps involved?

From my understanding, (forgive me if I am totally wrong on this one) I have to write a new bootloader for the Atxmega128a3u and I am done with it? Will all the things work (All libraries) as with say a normal MEGA board? (Or is some porting required? If so how?)
If this is the case how hard (in terms of programming) is it to write a bootloader?

Hoping someone can answer these questions..
Thanking you guys in advance :)

000

Can anyone give a start on where to begin in this ?

Coding Badly

Quote
I was thinking on the lines on why there wasn't any rush for arduino compatible Atxmega series of boards like Atxmega128a3u?(Is it due to Arduino Due?)


Don't know.  Other than the maximum voltage, that ATxmega128A3U is certainly nice.

You will need to program a new processor.  According to the datasheet you have two choices: PDI or JTAG.  Do you have a PDI / JTAG programmer?

Are you planning to develop the hardware and software?

Do you have a specific application in mind?


Quote
Will all the things work (All libraries) as with say a normal MEGA board?


I'm going to go with "no".  The basic hardware appears to be significantly different (and more feature-rich).

000

Quote
Are you planning to develop the hardware and software?


hardware to be specific. I was wondering how to do software portion also. I wanted do something like Xaduino.

Quote
Do you have a specific application in mind?

Currently no. Thinking in some areas though. It has built in DACs too. Seems better to invest time in these chips for future anyway :)

Quote
I'm going to go with "no". 

Why is that? Is it because its a new line of chips? How to start off developing these to arduino compatible form?

Coding Badly


Quote
I'm going to go with "no". 

Why is that? Is it because its a new line of chips?


I only spent a few minutes with the datasheet so I could easily be wrong.  It looks like the basic architecture is very similar or even identical (RISC; 32 registers; very similar instruction set) to the AVR.  That's the good news.

However, all the peripherals (timers, ADC, etcetera) appear to be different.  The essence of most Arduino libraries is to provide a simplified interface to a peripheral.  If the peripherals are different the library will be different; meaning the library will have to be rewritten.  That's the bad news.


Quote
How to start off developing these to arduino compatible form?


From my experience porting to ATtiny processors...

pinMode is always first.  digitalWrite is always second.  digitalRead is always third.  millis or delay is always fourth.  With those four functions you have the ability to perform crude debugging.  If possible, Serial is next.

• Porting the Arduino API is a creative endeavor.  You need to be prepared for a long-term commitment.  There will be fits and starts as your brain works out how to solve a problem.

• Porting the Arduino API is an intimate endeavor.  You need to have the hardware in one hand and the datasheet in the other.  I keep a notebook where I can write down ideas and snippets of useful information.

• Porting the Arduino API is an incremental endeavor.  Steal.  Whenever possible, "steal" something that works.  That is one of the biggest advantages open-source has over closed-source.  Leverage that advantage.


Specific things...

• Ensure the toolset is ready.  I believe the Arduino IDE ships with a compiler for the XMega processors.  Make certain.  Google will very likely be able to answer.

• Get the hardware.


You may want to spend some time with Google performing general searches.  For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/

Jack Christensen


You may want to spend some time with Google performing general searches.  For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/


Well written and well worth reading, thanks!

I have taken one or two quick looks at the XMEGA datasheets and they do look like interesting, powerful and useful chips. I have to wonder though, if they will get squeezed out of the market by low-end ARM offerings such as those that NXP has recently fielded. Which is not at all to say that the XMEGAs can't provide solutions that are just as effective or even more so.

I've only recently installed Atmel Studio and have only had time to blink some LEDs on AVRs with it. I wonder what it would take to get up to speed with Atmel Studio and the XMEGAs. (I'm also wondering the same thing relative to Atmel's ARM chips.)

Atmel Studio is fairly intuitive, especially if one has had some experience with Visual Studio. And AFAIK, it's not hobbled in any way. It really frosts me that the other MCU vendors play tricks like that. Just as one example, the free version of the LPCExpresso tool chain is C language only (no C++) and has code size limitations. Having said that, the LPC switch matrix is a very cool feature which addresses several of the issues mentioned in the link above regarding pin arrangement and alternate pin functions.

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

000

@Coding Badly Thanx for the tips :)

Quote
• pinMode is always first.  digitalWrite is always second.  digitalRead is always third.  millis or delay is always fourth.  With those four functions you have the ability to perform crude debugging.  If possible, Serial is next.


So it should basically be just re assigning of pins right? (I know you might not be able to answer unless you go through the datasheet properly)
My question is where do I edit these parameters from? (Sorry if I am being naive about it) 

Finally I may not actually port it because I think people have already ported it here.
http://www.obdiiworld.com/xaduino/Xaduino-Manual.pdf
(Did anybody on this forum did the above porting?)
I just wanted to know what were the basic things you do for such a porting.

Quote

You may want to spend some time with Google performing general searches.  For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/


Yes. That was the link that first got me interested in the chip. :)
Quote

I believe the Arduino IDE ships with a compiler for the XMega processors.


Shouldnt the compilers be the same?

Coding Badly

#7
Apr 27, 2013, 09:10 am Last Edit: Apr 27, 2013, 09:12 am by Coding Badly Reason: 1
Quote
• pinMode is always first.  digitalWrite is always second.  digitalRead is always third.  millis or delay is always fourth.  With those four functions you have the ability to perform crude debugging.  If possible, Serial is next.

So it should basically be just re assigning of pins right? (I know you might not be able to answer unless you go through the datasheet properly


Maybe.  The pin configuration for XMEGA is more complicated but has lots of interesting features...
http://www.atmel.com/Images/doc8050.pdf

You may be able to reuse the bulk of the Standard Core implementation to get basic I/O working.

Quote
My question is where do I edit these parameters from? (Sorry if I am being naive about it) 


The code is in wiring_digital...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring_digital.c

There are some type definitions in wiring_private...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring_private.h

The pin mapping is defined in pins_arduino...
https://github.com/arduino/Arduino/blob/master/hardware/arduino/variants/standard/pins_arduino.h

Quote
Finally I may not actually port it because I think people have already ported it here.


That is definitely worth looking over.  (The download is horrendously slow.  Snore.)

Bear in mind that is a Chinese website.  It even appears to be sponsored by the Chinese government.  Make absolutely certain your anti-virus software is up-to-date and try to avoid actually running anything from the download.

Quote
(Did anybody on this forum did the above porting?)


I haven't noticed anyone bragging about it.

Quote
Quote
I believe the Arduino IDE ships with a compiler for the XMega processors.

Shouldnt the compilers be the same?


It is indeed...
http://arduino.cc/forum/index.php/topic,161542.msg1208283.html#msg1208283

Coding Badly

#8
Apr 28, 2013, 12:21 am Last Edit: Apr 28, 2013, 12:23 am by Coding Badly Reason: 1

Some things about the download from http://www.obdiiworld.com/ ...

• The download took forever

• It's based on Arduino 1.0.1

• They use WinAVR 20100110 instead of 20081205

• [font=Courier New]pde.jar [/font]is different (that could be because Teensyduino is installed on my computer)

• Xaduino includes several libraries

• Xaduino includes a core (attached to this post)

• Webroot identified one threat in the download:[font=Courier New] .\arduino-1.0.1-windows-x\arduino-1.0.1\hardware\tools\avr\utils\bin\info.exe [/font]but Webroot has a tendency to generate false positives

westfw

See also https://github.com/akafugu/Xmegaduino
There are quite a few hits on a web search for "xmega arduino."

Till relatively recently, the more interesting xMega chips have been plagued with availability issues and bugs :-(
Since the Arduino core, by it's nature, is unlikely to be able to take advantage of the fancy peripherals, about the only advantage of xMega is the 32MHz clock rate, which is pretty much "not compelling" for the effort required for a new core and new hardware (especially since ... ARM!)  (ok, "big" xMega chips are now running lower cost than big MEGA chips...)

000

@Coding Badly Thanx for the info  :)
I am definitely going to take a look at those after this week :) (Finals coming up this week..)

Since those guys have ported it might give that a go..
Quote
• Webroot identified one threat in the download: .\arduino-1.0.1-windows-x\arduino-1.0.1\hardware\tools\avr\utils\bin\info.exe but Webroot has a tendency to generate false positives

Thanx for the headsup ;)

@westfw
Xmegaduino. I have seen it online(Couldn't go through it in detail though). Will give it a go soon...
Quote
about the only advantage of xMega is the 32MHz clock rate, which is pretty much "not compelling" for the effort required for a new core and new hardware (especially since ... ARM!)  (ok, "big" xMega chips are now running lower cost than big MEGA chips...)

Built in DACs, 32Mhz, 128KB Flash memory, sufficient I/Os and I think its cheaper than ATmega2560. So thats what got me interested in this at the first place.

What I had in mind is something like a small portable oscilloscope with the Atxmega. But what happened was that a bit of googling made me land up on this http://www.gabotronics.com/development-boards/xmega-xprotolab.htm 
:(  Kind of exactly what I had in mind(Except the display) :(
Its kind of hard to innovative these days. :(

Any ideas on something similar which I could improve/work upon on this?



Go Up