Re: PIC versus AVR



AVRGCC - single stack, does something odd when making function calls.

IAR, Rowley, ImageCraft - separate call and data stacks to prevent the
necessity for the above odd thing.

And yet people claim the AVR was designed to be C-friendly.
I've looked at AVR code generaged by GCC and IAR. The AVR is
not C-friendly. It may not be actively hostile like the 8051
or PIC, but it's not C friendly.

Any processor that falls over when you attempt to do any
pointer manipulation isn't C-friendly.

--

You are probably saying that an 8 bit architecture is inherently
C-unfriendly.
If you start in the other end: How do you make an 8 bit architecture which
is C-friendly
you may come to a different conclusion.

From this viewpoint it is "C-friendly" to use 2 instructions for 16 bit
operations
and 4 instructions to do 32 bit operations.


--
Best Regards,
Ulf Samuelsson
This is intended to be my personal opinion which may,
or may not be shared by my employer Atmel Nordic AB


.



Relevant Pages

  • Re: Moving from 8051 to AVR
    ... This applies to working with the AVR just ... Yes, that was the original argument - although it has now been slightly sidetracked by your claim as to *why* it is good, which was that it means any old PC programmer can then write good embedded code for the chip. ... IAR have plenty of knowledge of C compilers, but they have their own particular way of handling microcontroller functionality that has no place in standard C, such as handling flash memory spaces. ...
    (comp.arch.embedded)
  • Re: PIC versus AVR
    ... AVRGCC - single stack, does something odd when making function calls. ... IAR, Rowley, ImageCraft - separate call and data stacks to prevent the ... And yet people claim the AVR was designed to be C-friendly. ...
    (comp.arch.embedded)
  • Re: AVR compilers
    ... > CodeVision C for AVR ... You have JTAG ICE ... Download trial version from IAR webpage and they give you new trial license ... The next tool is GCC for AVR with Visual Micro Lab IDE. ...
    (comp.arch.embedded)
  • Re: PIC versus AVR
    ... necessity for the above odd thing. ... And yet people claim the AVR was designed to be C-friendly. ... I've looked at AVR code generaged by GCC and IAR. ... You are probably saying that an 8 bit architecture is inherently ...
    (comp.arch.embedded)
  • Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
    ... The only thing I don't like about the AVR is the Harvard ... >architecture this is nothing. ... I am not aware of an AVR compiler that ... supports "generic" pointers, hence when using pointers the programmer ...
    (comp.arch.embedded)