AVR MEGA 168PA

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

I have tried built my small app. My CPU is AT Mega168PA. But when I try build it I have got warning "Device not defined" Error in io.h. There is defined only
MEGA168 and Mega168A for iom168.h
Mega168P for iom168p.h

#elif defined (__AVR_ATmega168__) || defined (__AVR_ATmega168A__)
#  include 
#elif defined (__AVR_ATmega168P__)
#  include 

My question: Can I change io.h and use iom168p.h definition file for MEGA168PA ?

Last Edited: Fri. Feb 17, 2012 - 02:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the project options just say you are using mega168p rather than mega168pa and all will be well.

BTW the final version of 5.1 was released 2 days ago, worth checking

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

I am using new version AVR 5.1.
But I have found in:
C:\Program Files\Atmel\AVR Studio 5.1\extensions\Atmel\AVRGCC\3.3.1.27\AVRToolchain\avr\include\avr
directory this file :
iom168pa.h
I have change io.h file (add lines):

#elif defined (__AVR_ATmega168PA__) 
#  include 

But warnings and errors after building remain.

I know i can change 168PA to 168P but ...

Last Edited: Fri. Feb 17, 2012 - 02:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then raise a bug against Atmel's copy of AVR-LibC in the 5.1 tool chain, it's clearly in error.