Code difference AVR 90S8515 vs. ATmega8515

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

Translate This Thread From English to

Threaded View
Hi,

I found that when I compile a certain project in Imagecraft AVR for the
90S8515 or for the mega8515, the relative code sizes are 92% and 84%
respectively. Is this the result of new instructions I am unaware of or can
the Imagecraft compiler produce tighter code because some silicon bugs have
been resolved on the mega8515?

Meindert



Re: Code difference AVR 90S8515 vs. ATmega8515

Quoted text here. Click to load it
can
have

There are some new instructions, and some variations on existing ones.
Differences include movw instructions for moving two registers at once,
different addressing modes for the lpm instruction, and a hardware
multiplier which makes multiplication code (including array access) much
smaller.




Re: Code difference AVR 90S8515 vs. ATmega8515
Quoted text here. Click to load it

I figured that much, but couldn't download the instruction set. The atmel
site seems to be down.

Meindert



Re: Code difference AVR 90S8515 vs. ATmega8515
Quoted text here. Click to load it

  Just be very carefull -> if there is ever a chance Mega8515-built
code can be installed on an (older) 90S8515 field upgrade!

-jg


Re: Code difference AVR 90S8515 vs. ATmega8515
Quoted text here. Click to load it

Thanks for the hint Jim, but that won't be the case.

Meindert



Re: Code difference AVR 90S8515 vs. ATmega8515

Quoted text here. Click to load it
atmel

They have different signature bytes, so you really need so screw up to have
that happen...


--
Best Regards
Ulf at atmel dot com
We've slightly trimmed the long signature. Click to see the full one.
Re: Code difference AVR 90S8515 vs. ATmega8515
Quoted text here. Click to load it

  Signature bytes do not really protect against the problem, which is
accidental ship (by a user of both devices) of Mega8515 code into a
90S8515 device.
  Meindert was sharp enough to spot that the change of target gave
different code sizes - the average AVR user is rather more likely to
'find out the hard way' - tho you could argue that since clearly
(90S <> Mega) then it is user beware....

  It would probably help if
AVR085: Replacing AT90S8515 by ATmega8515
mentioned that opcode changes mean a Mega8515 build may no longer
be backward compatible on any existing 8515 products.
  - ie as a mid-run production change, there are risks.

-jg


Re: Code difference AVR 90S8515 vs. ATmega8515
Quoted text here. Click to load it

Aha, my code uses quit a lot of rommed strings to be output. This sure
explains the smaller code.

Thanks,
Meindert



Site Timeline