atmega165p and avr-gcc

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

Hi all,

I want to use avr-gcc for the atmega165p, however the current avr-gcc I am using (3.4.3, ubuntu package) does not support it. I saw a recent patch for this device on the gcc mailing list, but all it appears to do is alias the 165p to the generic "avr5" architecture. So do you think I could simply compile for -mmcu=avr5 or -mmcu=atmega165 and be ok?

Are the atmega165 and atmega165p binary compatible?

-kwr

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

> Are the atmega165 and atmega165p binary compatible?

There's an appnote describing the transition from ATmega165/169
designs to ATmega165P/169P. In short, yes, they are binary
upwards compatible. However, there are minor differences between
both, the most notable being they renamed USART to USART0.
Offhand, I'm not sure whether an occasional bit in some power-save
control register might have been added as well. So genuine ATmega165P
code would look a bit different, but as long as you're not going to use
these things, you should be fine with using ATmega165 code.

Current CVS of avr-libc supports both as distinct AVRs, but there's no
released version of avr-libc containing these changes.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

Thanks.

When I get samples I will try it out and followup with the results.

-kwr

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

I do have a sample, and have treated it as being an ATmega165
for quite some time.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.