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
russward
PostPosted: Mar 15, 2012 - 01:31 AM
Newbie


Joined: Mar 15, 2012
Posts: 4


i have written some m328 assembler code
but apparently cannot use studio to load the chip - yes ? have tried avrdude without success - i know the chip works since i use arduino-0022 to put blink example onto uno and can change blink times - where on this site should i look for some help on loading assembler code ?
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Mar 15, 2012 - 08:10 AM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22301
Location: Lund, Sweden

Quote:

have tried avrdude without success

Tell us more about that. What did go wrong? Error messages?
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
clawson
PostPosted: Mar 15, 2012 - 09:32 AM
10k+ Postman


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

Quote:

i know the chip works since i use arduino-0022

which just uses avrdude itself.

Maybe use the one that is located under the arduino directory tree and see if you can capture the exact command it is issuing (if no other way you can write a small C program called avrdude.exe that just does "for(i=0; i<argc; i++) printf(argv[i]);"

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Mar 15, 2012 - 02:27 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

russward wrote:
i have written some m328 assembler code but apparently cannot use studio to load the chip...

where on this site should i look for some help on loading assembler code ?
The new forum policy doesn't allow me to further explain this Laughing
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Mar 15, 2012 - 05:42 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22301
Location: Lund, Sweden

Quote:

The new forum policy doesn't allow me to further explain this

Oh yes it does. It just does not allow you to further "explain" it in your usual way.

Russward:

Long version: What MBedder is alluing to is that you do not load assembler code. You feed your assembler code to a program on your PC, called an assembler. It Takes the assembler code and comnerts it to "true machine code in s special format". The special format is almost certain the "Intel Hex" format. This is what you feed to your AVR programming hardware, which uses one of the programming interfaces of the AVR to get the machine code into the flash memory of the AVR.

Short version: You don't load assembler code into the AVR. You load machine code.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
russward
PostPosted: Mar 16, 2012 - 03:39 AM
Newbie


Joined: Mar 15, 2012
Posts: 4


ok thanx for replies - yes am avr newbie but 25 years ibm mainframe assembler coder so ok on hex file - so here is error message: avrdude : stk500 getsync():not in sync resp=0x00 also
avrdude stk500 disable () protocol error expect 0x14 resp=0x51 after i tried several avrdude commands always same response - thank you for help
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Mar 16, 2012 - 06:52 AM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22301
Location: Lund, Sweden

I did a search here at AVRfreaks for that error message (most error messages has been encountered before by someone, and not unlikely to have been discussed here in the past). Anything useful in this thread: http://www.avrfreaks.net/index.php?name ... +resp+0x00 ?
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
smileymicros
PostPosted: Mar 16, 2012 - 03:34 PM
Raving lunatic


Joined: Nov 17, 2004
Posts: 6506
Location: Great Smokey Mountains.

In this case it may be as simple as that he is using the Arduino board with AVRDude and doesn't realize he needs to press the reset button immediately ( as in less than 1 second) before running avrdude. But more details are needed to know what he is doing.

The following link might also help:
Moving Beyond the Arduino
http://smileymicros.com/blog/2010/10/03/42/

Smiley

_________________
FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
russward
PostPosted: Mar 17, 2012 - 02:45 AM
Newbie


Joined: Mar 15, 2012
Posts: 4


ok thanks for the replies - i guess i need to learn avrdude - what is good site to learn avrdude ? also, now that avrstudio has changed my code.asm to code.hex , is there another step similar to what i call linkage editor that makes hex file into actual executable before loading into chip ?
i have seen references to make in c language
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Mar 17, 2012 - 07:55 AM
10k+ Postman


Joined: Mar 27, 2002
Posts: 22301
Location: Lund, Sweden

Quote:
what is good site to learn avrdude ?


http://www.nongnu.org/avrdude/user-manual/avrdude.html
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
russward
PostPosted: Mar 23, 2012 - 02:25 PM
Newbie


Joined: Mar 15, 2012
Posts: 4


yes have had success in avrdude loading code.hex but please read on -
a- arduino website shows that getsync/14/51 error is pervasive but, sadly, there is no commonality in fixes which range from chips, cables, -c, to phases of the moon -
b - success of download is dependent on reaction time of operator between releasing reset button and hitting enter key - are you faster than an electron ?
c- even during successful downloads, another getsync/75 error sometimes occurs between the write and the read/verify - thus success is a true miracle
 
 View user's profile Send private message  
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