avr studio

11 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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 ?

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

Quote:

have tried avrdude without success

Tell us more about that. What did go wrong? Error messages?

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

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

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

 

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

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

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

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.

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

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

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

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

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=PNphpBB2&file=viewtopic&t=33368&highlight=stk500+getsync+sync+resp+0x00 ?

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

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

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

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

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

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

Quote:
what is good site to learn avrdude ?

http://www.nongnu.org/avrdude/user-manual/avrdude.html

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington]

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

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