NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » compiler error delay.c:1: error: MCU 'atmega328P' supported for assembler only

March 28, 2010
by Ralphxyz
Ralphxyz's Avatar

Well it don't work.

I am trying to program a ATmega328P MCU using C and the compiler seems to want assembly code.

I "strictly" followed the instructions in the: "NerdKits ATmega328P Upgrade Nano-Guide"

Thanks for the help, Ralph

March 28, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Ralph,

You are getting this message because your version of avr-gcc is not new enough to recognize the brand new 328p. You can verify this by typing

avr-gcc --version

in the command line. I think you need something higher than version 4.2.3. Downloading and installing the latest version of WinAVR should do the trick.

Humberto

March 29, 2010
by Ralphxyz
Ralphxyz's Avatar

I wish,

Compiler Error

Possible the problem is that I have 64bit Windows7?

Of course if I knew assembler there'd be no problem.

I believe I have the latest WinAVR (4.3.3) or at least the latest from SourceForge (who I really hate). Also I have PL2303_Prolific_DriverInstaller_v10518.exe installed as the com driver.

Ralph

March 29, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Ralph,

It looks like you have -mmcu=atmega328P in your Makefile, this should be -mmcu=atmega328p with a lower case p. I believe that is causing your problem.

Humberto

March 29, 2010
by Ralphxyz
Ralphxyz's Avatar

Unbelievable, you sure have good eyes. Corrected the P to p error now I get the butterfly error:

butterfly error

I have seen other threads with this butterfly problem but I can not comprehend the solution.

Ralph

March 29, 2010
by Ralphxyz
Ralphxyz's Avatar

After turning everything on and off a couple of times and unplugging the USB cable I got it to compile!

However now I am back to the two bars in program run mode!

Even with the MCU removed from the breadboard I get the two black bars is that correct?

Ralph

March 29, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Ralph,

Two black on the LCD is ok if you don't have the chip connected. Two black bars means the LCD is not getting data it understands. What code do you have on the MCU right now? Perhaps it might be a good idea to add a few lines to blink an LED on and off every second or so so that you can at least make sure that the program on the MCU is running.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that you can turn a $20 digital scale into a live weight sensor using our kit with a few extra parts? Learn more...