Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
dudedevil
PostPosted: Mar 18, 2012 - 07:56 AM
Hangaround


Joined: Aug 06, 2009
Posts: 167


Hi,
I am facing a problem with atmega128A. When I try to dump the atmega128 compiled code on to atmega128A my LCD program don't work. I have tested the code in proteus and it works fine. The same hex file was dumped on atmega32 and it is also working. But it donot work on atmega128A.

Is there any difference in atmega 128 and 128A. Do any one have faced the similar problem. Also is this the problem of compiler. I tried reinstalling the compiler but the same problem occurs.

Winxp under virtual box
crystal 7.32800Mhz
avr studio 4
winavr gcc latest
 
 View user's profile Send private message  
Reply with quote Back to top
jgmdesign
PostPosted: Mar 18, 2012 - 01:14 PM
Raving lunatic


Joined: Apr 20, 2007
Posts: 6061
Location: Long Island New York

Does the 128A have a M!)# compatibility fuse? If YES, is it programmed?

_________________
Jim

I have decided that I am no longer going to plan anything in advance. In a court of law this is called Pre-Meditated, and does not look good for the defense.....

Timer function not working properly? Check CLKDIV8 Fuse first Wink
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Mar 18, 2012 - 01:23 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62220
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

a M!)# compatibility fuse

Could that be M103C perhaps? Wink

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 03:37 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


I need to check this. M103C must be atmega103 compatibility mode? If yes then I will reply soon once i confirmed. But the issue is that avr studio allows atmega128A for assembly only. Also I am using USBASP programmer. Thus the free software don't have atmega128A settings.
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 03:38 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


I have checked . With mega128 settings. M103c flag is programmed.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Mar 18, 2012 - 03:52 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16259
Location: Wormshill, England

In case you have not realised.

You remove the M103C fuse.
You choose mega128 as your target AVR for both avrdude and avr-gcc.

Ignore the A in mega128A.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 04:38 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


Yes i removed the fuse. But same problem. I want to clear that when i compile the code with m32 settings and dump the generated hex file on m128A the LCd works fine.
Now when I compiled in m128 settings and disabled the m103c fuse lcd screen line1 just show black boxes. Sad . I am very much fed up. Have not faced such problem before.
 
 View user's profile Send private message  
Reply with quote Back to top
jgmdesign
PostPosted: Mar 18, 2012 - 04:53 PM
Raving lunatic


Joined: Apr 20, 2007
Posts: 6061
Location: Long Island New York

Quote:
Could that be M103C perhaps?


OOPS!!

_________________
Jim

I have decided that I am no longer going to plan anything in advance. In a court of law this is called Pre-Meditated, and does not look good for the defense.....

Timer function not working properly? Check CLKDIV8 Fuse first Wink
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 05:58 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


I am using 4.18 ver of avr studio. I uninstalled it and downloaded the 4.19 ver. This version suppose to have avr128A support. But i am getting wierd erros with 4.19. I am not able to compile the code.
Code:
rm -rf avr128a.o  avr128a.elf dep/* avr128a.hex avr128a.eep avr128a.lss avr128a.map
Build succeeded with 0 Warnings...
mmcu=atmega128a -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT avr128a.o -MF dep/avr128a.o.d  -c  ../avr128a.c
/usr/bin/sh: -Wall: command not found
make: [avr128a.o] Error 127 (ignored)
mmcu=atmega128a  avr128a.o     -o avr128a.elf
/usr/bin/sh: avr128a.o: command not found
make: [avr128a.elf] Error 127 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  avr128a.elf avr128a.hex
avr-objcopy: 'avr128a.elf': No such file
make: *** [avr128a.hex] Error 1
Build failed with 1 errors and 0 warnings...

winavr gcc is latest i think version 10. why such errors.
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Mar 18, 2012 - 06:05 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62220
Location: (using avr-gcc in) Finchingfield, Essex, England

4.19 has stopped looking for WinAVR so you have to manually edit the project options to tell it where make.exe and avr-gcc.exe are located:
Code:
root@ws-czc1138h0b:/windows/WinAVR-20100110# find . -name avr-gcc.exe -or -name make.exe
./bin/avr-gcc.exe
./utils/bin/make.exe

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 06:09 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


I see.
Should i pass this in cmd prompt. or in avr studio. As i had never done this before. Kindly guide me. A little more help needed Smile.
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 06:13 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


ok .
I think i should pass the path in avr studio. ?
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 06:17 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


Thanks clawson. code compiled without errors. I will be checking whether it works on lcd. Will reply soon. But the problem is m128A is only for assembler in 4.19 also.
 
 View user's profile Send private message  
Reply with quote Back to top
dudedevil
PostPosted: Mar 18, 2012 - 06:25 PM
Hangaround


Joined: Aug 06, 2009
Posts: 167


GREAT ,
IT worked. avr studio 4.19 works for m128A. Thanks. Also i disabled the m103c fuse. Dont know what exactly the problem was. I think new make file generated the code properly. Any body who is suffering with this error please install avr studio 4.19.
Thanks to all who helped me. " david.prentice" Thanks a ton. Clawson U Rock ! . Guys i really mean it i was facing this error from lat four days.
AVRFREAKS is a awesome site.

Regards,
Pratik .R. Bhagat
 
 View user's profile Send private message  
Reply with quote Back to top
bobgardner
PostPosted: Mar 18, 2012 - 07:16 PM
10k+ Postman


Joined: Sep 04, 2002
Posts: 21248
Location: Orlando Florida

And we didn't charge you $90 an hour for consulation fees! Truly a super AVR forum.

_________________
Imagecraft compiler user
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits