Atmel Studio 7 GCC error for ATmega8A

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

I have programmed my ATtiny13A successfully using the Atmel Studio 7 with my USBASP programmer. Then I tried to compile the same code for e too. Then I had so many errors but the most significant one that explains everything was this one: "ATmega8A is not supported by avr-gcc". I have found nobody talking about such a problem before (it was noticed for other MCUs) so I hope I can find the reason for it. I've heard that ATmega8A was binary compatible with ATmega88P, so maybe that could work.

Last Edited: Tue. Jun 25, 2019 - 12:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just set a project I happened to have loaded to "mega8A" anbd rebuilt and got
 

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

So works here.

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

I'm not home right now but when I go home I will try again and show a screenshot of the errors. It looks quite interesting that only I have this problem.

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

I was going to say it might be "device packs" that are out of date on your machine (even if your actual AS7 is fairly recent) but two things (1) my own packs are probably quite dated anyway and (b) I have a feeling that 8A is so established it's not coming from the packs anyway but is part of the core toolchain installation.

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

You are probably right. I checked my io.h and saw those lines:

#elif defined (__AVR_ATmega8__)
#  include <avr/iom8.h>
#elif defined (__AVR_ATmega48__) || defined (__AVR_ATmega48A__)
#  include <avr/iom48.h>
#elif defined (__AVR_ATmega48P__)
#  include <avr/iom48p.h>
#elif defined (__AVR_ATmega88__) || defined (__AVR_ATmega88A__)
#  include <avr/iom88.h>

ATmega8A is not defined unlike the others. My question is, will it solve the problem to add this MCU with an or? Or do I need to install anything?

 

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

I looked at avr/io.h from WinAVR-2010010

#elif defined (__AVR_ATmega16HVB__)
#  include <avr/iom16hvb.h>
#elif defined (__AVR_ATmega8__)
#  include <avr/iom8.h>
#elif defined (__AVR_ATmega48__) || defined (__AVR_ATmega48A__)
#  include <avr/iom48.h>

So yes,  there was a time that io.h had two entries to a line.

My current AS7.0 has

#elif defined (__AVR_ATmega16HVBREVB__)
#  include <avr/iom16hvbrevb.h>
#elif defined (__AVR_ATmega8__)
#  include <avr/iom8.h>
#elif defined (__AVR_ATmega8A__)
#  include <avr/iom8a.h>
#elif defined (__AVR_ATmega48__)
#  include <avr/iom48.h>
#elif defined (__AVR_ATmega48A__)
#  include <avr/iom48a.h>

I STRONGLY suggest that you install AS7.0 correctly.   Life is much easier when we all have the same set of Tools.   Then we can help you through any problems.

 

David.

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

 

Presumably this was some kind of "import" where it tried to maintain use of some old, outdated toolchain? In the project settings what is the "toolchain flavour" set to?

 

That is this setting:

 

 

"native" means "the one that was installed by AS7". Unless there's some reason you have to work with "legacy" this should always be set to "Native". When I successfully built for mega8A above I had not changed this so it was "Native".

 

BTW should you need to configure flavours, as the dialog says nearby says:

 

 

Last Edited: Tue. Jun 25, 2019 - 01:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, thanks. I have changed it to winavr when I have just opened the app and followed a tutorial that tells me to do this. 

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

2009's WinAVR in 2019?