| Author |
Message |
|
|
Posted: Mar 15, 2012 - 01:31 AM |
|

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 ? |
|
|
| |
|
|
|
|
|
Posted: Mar 15, 2012 - 08:10 AM |
|


Joined: Mar 27, 2002
Posts: 18520
Location: Lund, Sweden
|
|
|
Quote:
have tried avrdude without success
Tell us more about that. What did go wrong? Error messages? |
|
|
| |
|
|
|
|
|
Posted: Mar 15, 2012 - 09:32 AM |
|


Joined: Jul 18, 2005
Posts: 62220
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]);" |
_________________
|
| |
|
|
|
|
|
Posted: Mar 15, 2012 - 02:27 PM |
|

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  |
|
|
| |
|
|
|
|
|
Posted: Mar 15, 2012 - 05:42 PM |
|


Joined: Mar 27, 2002
Posts: 18520
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. |
|
|
| |
|
|
|
|
|
Posted: Mar 16, 2012 - 03:39 AM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Mar 16, 2012 - 06:52 AM |
|


Joined: Mar 27, 2002
Posts: 18520
Location: Lund, Sweden
|
|
|
|
|
|
|
Posted: Mar 16, 2012 - 03:34 PM |
|


Joined: Nov 17, 2004
Posts: 6137
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
|
| |
|
|
|
|
|
Posted: Mar 17, 2012 - 02:45 AM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Mar 17, 2012 - 07:55 AM |
|


Joined: Mar 27, 2002
Posts: 18520
Location: Lund, Sweden
|
|
|
|
|
|
|
Posted: Mar 23, 2012 - 02:25 PM |
|

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 |
|
|
| |
|
|
|
|
|