Author Topic: Which IDE support ATmega8A with Atmel ICE  (Read 1138 times)

0 Members and 1 Guest are viewing this topic.

Offline muthukural001Topic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: in
Which IDE support ATmega8A with Atmel ICE
« on: April 10, 2018, 03:28:02 pm »
Hello All,

I need to develope code for ATmega8A and only programmer I am having is Atmel ICE. I tried to develop code using Atmel studio 7.0 and got a lot of undeclared error that I am not aware.

Errors like,

'PRR0' undeclared (first use in this function)

'PRADC' undeclared (first use in this function)

'PRITIM1' undeclared (first use in this function)


tried the same with Atmel studio 6.2 which is the minimum version needed to support Atmel ICE and got the same error.


Please suggest.



Thanks,
Muthu

 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2582
  • Country: us
Re: Which IDE support ATmega8A with Atmel ICE
« Reply #1 on: April 10, 2018, 06:10:41 pm »
Those don't look like standard AVR names.  Typically the avr header files use singly defined names for peripheral registers, so for instance USART 0 Control Register A will be named UCSR0A, Control Register B will be UCSR0B, etc.  Unlike some other platforms, they don't tend to define structs for peripherals.  The exception, IIRC, are the XMega parts, which I believe do have structs defined.

Atmel Studio is really good at just working (except when it doesn't), so make sure to use the new project wizard and properly select your part.  That should include the right header files.  Then consult the header files or some example code to figure out the proper register names.  Once you know the scheme it's pretty easy to figure out the names you want.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: us
Re: Which IDE support ATmega8A with Atmel ICE
« Reply #2 on: April 10, 2018, 08:36:40 pm »
The missing symbols are bits in the power reduction register PRR, which doesn't exist on an atmega8.
You're probably trying to compile software that was designed for the ATmega168 to ATmega328 family chips.
(Arduino SW, perhaps?  Although the Original Arduinos had an ATmega8 chip, a lot of the more recent libraries and examples don't try to be backward compatible to the older chips.)
« Last Edit: April 10, 2018, 09:55:50 pm by westfw »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf