c compiler for atmega? - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: c compiler for atmega?
Quoted text here. Click to load it
now
group
supports

I am not claiming that COFF is the best possible object file format.
I dont argue against the fact that adding ELF/DWARF would improve AVR
Studio.
I am arguing that AVR Studio is a toolset which can be used by other
compiler manufacturers
to generate good code, but with less excellent debugging info.
It is a proprietary architecture that supports the IAR well, and others less
well at this stage
but has the potential to support others well in a much better way that what
was
possible with AVR Studio 3.

I am arguing against the idea that the lack of ELF/DWARF is because Atmel
wants to protect IAR:
There are simply too many things indicating this is not the case.
Atmel has spent time on bug fixing AVR Studio to make gcc for AVR run
better. I have personally
been involved in trying to find problems with AVR Studio when running with
other toolsets,
and have seen them beeing fixed.

Quoted text here. Click to load it
command-line to call.
Quoted text here. Click to load it
compilers.

I do not see that this favours IAR; since there is no DLL to call IARs C
compiler either.
The way I work, the Compiler runs in its own window, I recompile, and then
AVR Studio
detects that the object file is changed and loads the new object file.
This should work with any compiler toolchain.
Removing the simple command line call, does not change the fact that
the architecture of AVR Studio was designed to allow third party plugins.


Quoted text here. Click to load it

I have lots of opinions that differ from that of my employer.
I think that the AVR Assembler should be open source, because this is really
a place where improvement is needed.
The fact that I think this, does not make it an Atmel opinion.

If I provide you with info, then this is based on what I know, and what I
believe is not a company secret.
It is not an official Atmel statement and might be untrue, simply because I
do not have all the info
or the info I have is obsolete.
For all I know, Atmel could be working on an ELF/DWARF parser without
telling me.
Since I prefer not to hide the fact that I am an Atmel employee, I think it
is advisable to
remind people that if they want an official Atmel opinion on a subject, then
they need to get it elsewhere.


--
Best Regards,
Ulf Samuelsson   ulf@a-t-m-e-l.com
We've slightly trimmed the long signature. Click to see the full one.
Re: c compiler for atmega?
Quoted text here. Click to load it

But only by extending the COFF format, not with migrating to a better
format. AVR Studio 4 requires the "AVR Extended COFF" format which
barely improves things over AVR Studio 3's "AVR COFF" format.
 
Quoted text here. Click to load it

Which is true; I have seen that too. However, the community is waiting
for a next release of AVR Studio 4 that includes some of these fixes.

Quoted text here. Click to load it

Point.


However, AVR Studio can detect that the object file has been changed
*without* requiring an architecture change that means to call a
compiler you have to use a binary plugin. The "plugin" versus
"command-line call" architecture debate does not affect the ability to
detect object file change, but it does affect the ease of use in
setting up 3rd party compilers.


Quoted text here. Click to load it

Sure, and I respect that. I think everybody in the whole comp tree
does! :)

Quoted text here. Click to load it

What I don't understand, is why have an "Atmel assembler" to begin
with? When there is the free software from the GNU project: binutils,
to provide assembler, linker, librarian and other utilities, GCC for
the compiler, GDB for the debugger, etc.
 
Quoted text here. Click to load it

Actually, they are! There has been a post on the avr-gcc-list mailing
list of someone from Atmel requesting DWARF samples, and he said he's
working on an ELF/DWARF parser.

Quoted text here. Click to load it

IMO, users are interested in *any* comments from Atmel. For a long
time Atmel has been seen as non-communicative. So even unofficial,
personal opinions from someone on the inside are very welcome. :)

Eric

Re: c compiler for atmega?
On 14 Oct 2003 09:28:13 -0700, in msg


Quoted text here. Click to load it

Since "I don't do windows" I can't answer this, so I'll ask the question:

Would it be that hard for someone to write an AVR Studio 4 plugin that does the
command line call, similar to what was done in Studio 3?

It would seem that this would restore the Studio 3 functionality that was
removed in Studio 4.

-Zonn
--------------------------------------------------------
Zonn Moore
Zektor, LLC
www.zektor.com

Remove the ".AOL" from the email address to reply.

Re: c compiler for atmega?
Quoted text here. Click to load it

Corrections: The GUI based debugger, Insight, has been around for
quite some time, on various platforms and for various targets. It is
only in the most recent release of WinAVR that it has been built for
the Windows platform. And also, Insight, is nothing but a GUI wrapper
around GDB. The JTAG ICE support comes from the AVaRICE project which
is the glue between the JTAG ICE and GDB.

I would not necessarily say that any of the developers are
"sidestepping" AVR Studio. AVR Studio is currently the best free AVR
simulator. There is also the SimulAVR project (which connects with
GDB) but it is not as advanced as AVR Studio, yet. The main issue with
AVR Studio is that it only accepts 3 file types:
1. Nordic Object: Atmel's proprietary format for their assembler.
2. UBROF: IAR's proprietary format.
3. COFF: For everybody else.

GCC natively produces the ELF format, which is none of the above. The
ELF format also has a related debugging format, called DWARF (Search
on Google for more info). In order for users of the GCC compiler to
use AVR Studio for simulation, the file format has to be converted.
One of the main AVR open source developers has recently wrote a ELF to
COFF converter, however it is in Beta. Still, it is known that AVR
Studio has some special features that is uses with IAR's UBROF format
and not other formats. It is also known that the COFF format is old,
and not widely used as much any more because other formats are better.
It is also known that the COFF format does not support C++ very well.

Plus AVR Studio can only run on Windows.

So, with all this, it is not so much that the open source AVR people
are abandoning AVR Studio, as so much as finding the right tool for
the job. There is the open source debugger, GDB, which has been around
for a long time and is used for many targets, including embedded
targets. GDB has an AVR port. However, you have to use some "helper
programs" for the AVR:
1. AVaRICE: For using a JTAG ICE.
2. SimulAVR: For simulation.

AVaRICE is very usable and I've heard good reports. SimulAVR can be
used but it is not nearly as good as AVR Studio, yet. But all of these
tools are cross-platform and can be run on Windows, Linux, FreeBSD,
and there have been report of them being built on Mac OSX and Solaris.

Considering that the Open Source AVR toolset is run by volunteers,
it's just a matter of time, energy and finding or writing the tools to
do the job.

Quoted text here. Click to load it

Indeed. Even if it is not "totally" the case, it certainly gives the
impression.

Eric Weddington
------
My views are not that of my employer. Duh!

Re: c compiler for atmega?

[...]
Quoted text here. Click to load it

Indeed, let's look at this from Atmel's perspective:

1) Atmel makes money by selling chips.
2) Good tools sell chips.
3) Because of 2, Atmel worked with IAR to develop good tools.
4) Because of 3, the tools best support IAR.
5) Because of 3, Atmel does not want to make IAR unhappy.
6) Avr-gcc is also a good tool, and competes with IAR.
7) Because of 6, making AVR Studio play nicer with gcc could make
   IAR unhappy.
8) Because of 2, Atmel wants better support for gcc.
9) Atmel doesn't pay the people working on SimulAVR, Insight, or GDB.
10) Despite 9, these tools are (so far) always getting better.

Atmel's options are:

A) Add ELF/DWARF support to AVR Studio.
B) Do not add such support.

Option A costs money and opportunity.  It also risks displeasing IAR.

Option B costs nothing.  It only risks displeasing the gcc community,
whose likely reaction will be to improve its own tools in order to
dump Atmel's.  They (probably) aren't going to react by dumping the
chips themselves, especially after having put so much time and effort
into supporting them.  Since Atmel makes its money from chips and not
(free, as in beer) tools, this is no skin off Atmel's nose.  In fact,
better gcc tools may actually help Atmel sell more chips.

Disclaimer: this is all speculation.  But I think it makes sense.  I'm
not claiming there's any conspiracy against gcc or even collusion
between Atmel and IAR (beyond the obvious fact that they are friendly
toward one another).  It's just reasonable (and even logical)
behavior.

Regards,

                               -=Dave
--
Change is inevitable, progress is not.

Re: c compiler for atmega?

Quoted text here. Click to load it

To get best performance out of your compiler, you should compile your
code on maximum optimization and then reduce the optimization level
for those cases generating "bad code". You can reduce the optimization
on individual files, functions, or sections of code.

Quoted text here. Click to load it

I would also be interested in seeing some actual code.  

Worth noting is that if you are writing plain ANSI/ISO code (without
any memory attributes or other hints to the compiler) it's very hard
for _any_ compiler to be *really* efficient.  Once you add hints as to
where variables and functions should be placed, you improve the code
significantly (both regarding space and speed).

Quoted text here. Click to load it

That entirely depends on which library functions you are using. For
example, the strXXX() functions are usually small and fast, while
printf() and scanf() functions usually should be tuned to your
specific needs, or avoided if you really don't need all the
functionality.

Quoted text here. Click to load it

Yes, the inline assembler is lacking in functionality.  

I would, however, be very interested in seeing the loop where you
doubled performance by writing it in inline assembler.

Best wishes,
Mats Kindahl, Senior Development Engineer
--
IAR Systems in Uppsala, Sweden.

Any opinions expressed are my own and not those of my company.

We've slightly trimmed the long signature. Click to see the full one.
Re: c compiler for atmega?
Quoted text here. Click to load it

That may sound naive, but a compiler never ever should generate bad
code !
If so it is or certain modes of it's usage are useless.
Or is there a warning like: -O3 might generate bad code !

(BTW: It's a problem I've seen with many compilers, I guess that's
what they call agressive optimization, but in fact it make the tools
useless.)

---
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.
Re: c compiler for atmega?


Quoted text here. Click to load it

From what I've seen, every last one of them is capable of generating bad
code.  That's why you see complex pieces of code -- like OS's and
middleware -- specifying the compiler and version you must use.




Re: c compiler for atmega?
snipped-for-privacy@yahoo.com (42Bastian Schick) writes:
Quoted text here. Click to load it

If you start a new career as a compiler writer, I predict that you will
be able to work for many years in that field before achieving your
goal.

Re: c compiler for atmega?
On 13 Oct 2003 00:28:20 -0700, Eric Smith

Quoted text here. Click to load it

I guess it is more a punishment than a career.

No, actually I have great respect for those guys.

---
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.
Re: c compiler for atmega?
Quoted text here. Click to load it
application
With

hey Ian,

would you be willing to share your asm TEA implementation.  I have been
using tea on a AVR but just the compiled C code.

Tried to email you direct but the mail just bounced.

Thanks
Ralph




Re: c compiler for atmega?

Quoted text here. Click to load it

They are all stable. But, given the existence of the excellent avr-gcc
(e.g the WinAVR distribution), I see no reason to pay for some dongled
/ protected proprietary one.

--

John Devereux

Re: c compiler for atmega?
Thanks to all for the answers. Good to know
that these compilers are all pretty sound and solid.

--
Thanks,
Frank Bemelman
We've slightly trimmed the long signature. Click to see the full one.
Re: c compiler for atmega?
Quoted text here. Click to load it

Sheesh. You guys gave all these serious academic answers. I thought a stable
compiler would have a a half-life decay time of five years or more..... And no
one mentioned Imagecraft, which has a global optimizer/code compressor in its
compiler, and brags abvout being ansi c. There is a compiler survey on
avrfreaks that shows compiler use by percent... iar, gcc and icc are the main
3, icc is 3rd with 11% last time I looked, but it wins in price and ability to
talk to the developer on email.....

Re: c compiler for atmega?



Quoted text here. Click to load it

Also remember that not ALL developers take the survey. I am almost certain that
ICC AVR's sales is higher than most other compilers, discounting GCC.

--
// richard
http://www.imagecraft.com



Re: c compiler for atmega?
On Tue, 21 Oct 2003 02:25:59 -0700, "Richard F. Man"

Quoted text here. Click to load it

Where is this survey? I surfed over to AVRFreaks and the only survey I
saw was one regarding the Butterfly.

s/
An ICC user who never ran across that particular survey and who might
mention, too, the statistical invalidity of self-selected "surveys."

PS. Actually an ICC user twice, since I bought the ICC430 compiler also.

--
Rich Webb   Norfolk, VA

Site Timeline