(solved)Noob Trouble, GCC bug with Atmega324p?

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

Using WinAVR 20070525
Programmers notepad
AVR Studio 4.13.528

At this time i'm trying to modify Peter Fleury's STK500v2Bootloader for the ATmega324p and i'm hitting a snag.

Peter uses the following construction to define signature bytes, (everything shortened to minumum)

#if defined (__AVR_ATmega8__)
    #define SIGNATURE_BYTES 0x1E9307
//etc etc etc
#else
	#error "no signature definition for MCU available"
#endif

So i changed it to:

#if defined (__AVR_ATmega8__)
    #define SIGNATURE_BYTES 0x1E9307
//etc etc etc
#elif defined (__AVR_ATmega324p__)
    #define SIGNATURE_BYTES 0x1E9508
#else
	#error "no signature definition for MCU available"
#endif

And i changed the makefile to:

# MCU name
MCU = atmega324p

But every time i try to compile with the new files i get
stk500boot.c:161:3: error: #error "no signature definition for MCU available"
If i use atmega8 in the makefile everything compiles like a charm.

If i understand correctly GCC looks at the makefile for the MCU name and then defines __AVR_ATmega324p__ ?

What am i doing wrong, or what is going on, is this a bug?

Last Edited: Wed. Jul 18, 2007 - 05:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try:

__AVR_ATmega324P__

(notice the size of the P in that!)

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

clawson wrote:
Try:

__AVR_ATmega324P__

(notice the size of the P in that!)

Compiled in 1 go, Thanks!!!

I think it was the sleep deprivasion last night when i tried it, thought i tried that too........

5 minutes = bonus points :D