Having trouble with AVR Studio4 ISP.

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

Well.. it's been a while without being into avr much as i am still a student despite my personal projects, i have been busy with university works too Anyways,

My problem is simple i have been usually doing most of my ISP programing with a usbtiny programmer and Winavr IDE. however i have recently merged into AVR Studio4 (currently running 4.19 Version) to get a better monopoly on the actual programing data such as variables, Registers, start up & initializations etc....

I have set up everything pretty much. the programmer is a STK500 (Though this is a clone) I think we all know that AVR Studio don't originally support a USBtiny Programmer. (Briefly i have followed some advice from Ladyada.net) of congigurating a usbtiny with avr studio4 by creating 2 integrated Ports which hack the IDE to think that a usbtiny is actually a STK500 and i worked fine.

So the Problem is this, I have a clean and clear hex file of the actual program i want to load to the mcu (Atmega32 BTW) already loaded into my "input Hex file" Path BUT when i press program i am getting this error

" A Problem occurred when executing a command make sure you are using the correct programming method........" 

Here something very funny are the fact that:

1. The programmer is definitely recognized by the IDE,
2. This can't really be the actual problem of the ISP like it is suggesting since the Chip Signature is neatly being read every single time Unless it is probably a Bug else i am missing something here ':roll:'
3. every other bits and bolts are all clear, this include reading of the fuses, Lockbits etc.... Except when i got to the 5th partial window of HW Setting it always gives me a pop up window saying that

 
" A Problem occurred when executing a command see the command output for more info" 

and on the bottom of window there also is

 "GET VTARGET:Command of no use for AVR ISP Fail.

4. This again really have nothing to do with the actual isp configuration in terms of probably poor connection or misplacing ISP pins. i have also double checked there are no active components interfering some MISO, SCK etc.. pins of ISP when programing (atleast this could make sense),
in facts i have another Winavr window open i can successfully load the program without changing anything. while the other Avrstudio window of the exactly identical code along with a successful hex file is giving me this headache.

I really like interacting with software but i should admit i desperate hate when i keep on trying on something until i can't at least think of any logical alternative way that i can further try. How the H**l is this meant to happen while the cheap's signature is clear, Both Entering and leaving Programing modes are fine.

BTW my Fuses configurations are as follows : Only JTAGEN & SPIEN are set implying theat LOW = 0xE1 and HIGH =0x99

Your Help is Very much appreciated.

Cheers.

Last Edited: Thu. Nov 15, 2012 - 03:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you tried with avrdude to be sure that everything works correctly (programmer+chip)?

I would suggest a try with http://avr8-burn-o-mat.aaabbb.de... which is a front end for avrdude.
If that can work with your programmer as STK500 then you can focus on AVRstudio.

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

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

Hi Alex, Thanks for your Response
But doesn't this meant to be taken care of Winavr IDE? (Avrdude maybe?)
I already have in facts another winavr ide window active it's only a matter of exchanging windows but the Avrstudio programed is always getting these error.
AVR studio really was built in some poor manners. in facts it's such a shame that a company like Atmel does make something with better interface but poor performance. at least they could have either integrated any C compiler such as GCC or alternatively point to windows to see if any folder happen to be having it such as Winavr etc...) without having to load gcc.exe & make.exe all the time this is also another pain.

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

Basically I meant try to program the device using AVRdude either by command line or the front end I mentioned, if that works then there is probably something wrong with AVR studio (like a setting), if not then maybe there is a problem with the chip or the programmer.

Did you try with avrdude using the winAVR ide and it worked (as STK500 since that is what you use in AVRstudio)

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

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

Quote:

doesn't this meant to be taken care of Winavr IDE?

WinAVR does not have an "IDE" unless you mean Programemr's Notepad?

Clearly AS4.19 as an IDE is only guaranteed to work with Atmel branded programmers. You may have some device that has stolen the Atmel STK500 name but that doesn't mean it's necessarily bound to work.

To be honest, if it doesn't just work I'd forget about trying to get programming working from inside AS4 and just use an external program like avrdude. If you don't like command line interfaces then turn it into a Widows GUI programming by running it from within one of the several avrdude "wrapper" programs that exist.

Quote:

in facts it's such a shame that a company like Atmel does make something with better interface

Are you talking about Studio 6 perhaps?
Quote:

at least they could have either integrated any C compiler such as GCC

Which is EXACTLY what they have done in Studio 6.

But it still only drives Atmel branded equipment.

Quote:

without having to load gcc.exe & make.exe all the time this is also another pain.

But however fancy they look this is all any IDE for avr-gcc is ever doing - it's a command line tool, usually driven be a Makefile and operated from make.exe and AS4 or AS6 or Eclipse or Netbeans or CodeBlocks are really just creating a Makefile for you and then invoking "make" to build. And that's still true in AS6 even though it may give the impression of having the C compiler "built in".

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

Quote:
AVR studio really was built in some poor manners. in facts it's such a shame that a company like Atmel does make something with better interface but poor performance.

Studio 4.19 works perfectly well, and for the hobbyist is IMHO the ideal enviroment as there is not a lot of 'extras' and such like in AS6 that the hobbyist may not need. It's designed to work with ATMEL parts. If you purchased a knockoff of something and you are having problems then you need to figure out how to make it work since it is not a genuine OEM ATMEL device.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Thank you al for your Alternatives,
@ Alex. Did you mean using command line test such as: avrdude -c usbtiny -p m32 maybe? Yes, this works well and i surely get

 
Reading: ############################# :100% 0.6s
Avrdude: Device signature - 0x1e9502
Avrdude: Safe mode : Fuses OK!!
Avrdude Done! Thank you. 

I am gonna give a try about using avr8-burn-o-mat and see how it goes.

I also probably forgot to mention that the only failure is on the "Programming Flash" which I get FAILED! all other steps are fine.

Thanks.

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

The Snippet picture of the programming steps

Attachment(s): 

Last Edited: Fri. Nov 16, 2012 - 04:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Th avr8-burn-o-mat can't detect the programmer Either!
Well.... i hope it's time to get a real Atmel programmer then, but it's really weird that after all the Studio4 IDE couldn't Program the flash although it could read the signature and fuses etc... correctly.

thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
avrdude -c usbtiny -p m32

This implies that you possess a USBTINY device.
Please post a photo / model number / weblink to your actual programmer.

Studio will only control ATMEL programmers.
I don't know how you managed to get your screenshot.

Of course it can't (and won't) control a USBTINY.
Studio should be quite happy controlling a STK500 clone.

Either use avrdude or buy a real Atmel programmer.

David.

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

Kase57 wrote:
Thank you al for your Alternatives,
@ Alex. Did you mean using command line test such as: avrdude -c usbtiny -p m32 maybe? Yes, this works well and i surely get

 
Reading: ############################# :100% 0.6s
Avrdude: Device signature - 0x1e9502
Avrdude: Safe mode : Fuses OK!!
Avrdude Done! Thank you. 

No this is not what I meant, I'm sure it is working as a usbtiny but that is not what you are trying to do using AVR studio, you try to access it as a STK500 so you should try as a STK500 with avrdude too to see if it works.
If avrdude can't "see" it as a STK500 then how can AVRstudio work.

Kase57 wrote:
Th avr8-burn-o-mat can't detect the programmer Either!

Did you set the programmer type and port in the settings (top menu settings -> avrdude).
I have used usbtiny and usbasp with no problem.

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

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

david.prentice wrote:

avrdude -c usbtiny -p m32

This implies that you possess a USBTINY device.
Please post a photo / model number / weblink to your actual programmer.

Studio will only control ATMEL programmers.
I don't know how you managed to get your screenshot.

The OP described in the first post that he has a usbtiny hacked some way to be seen as STK500 so that it can work with AVRstudio, that is why I asked him to try to access it as a STK 500, to see if this hack works with avrdude so can verify that it is not the problem.

Alex

"For every effect there is a root cause. Find and address the root cause rather than try to fix the effect, as there is no end to the latter."
Author Unknown

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

The original "usbtiny" design runs on a ATtiny2313 using the low-speed V-USB.
In fact it is a very tight squeeze to fit it into the tiny 2kB of flash. (which may account for the name)

Of course it may be possible to implement the V-USB "RS232" and the whole stk500v2 protocol within 2kB. (and deserve a medal)

I have compiled the "usbtiny" design for running on "usbasp" hardware which uses an 8kB ATmega8 chip.

It should be possible to implement a STK500 clone with an 8kB chip. My own serial STK500 clone fits inside 4kB and uses the FTDI of an Arduino.

So all things are possible. It is just so much easier if we could identify the actual programmer that the OP is using.

David.

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

Thank you all for your assistance.
to be Honest I aren't going to be bothering anymore about this
I hope it's very well Said that i really do need an Atmel based programmer
Although i have heard some people saying that they were successful to use AS4 with a USBtiny Programmer following this method

http://www.ladyada.net/make/usbt...

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

Quote:

to use AS4 with a USBtiny Programmer

That's never been directly possible. What make the tiny so tiny (it fits in 2K) is that almost all the "brains" happens on the PC software side of things and those "brains" are not inside AS4.

That page you linked to is using a very convoluted process to make a "virtual COM" port on the PC that AS4 talks to then it talks back into a PC program running on the PC alongside AS4 and that then does the USBTiny "brains" stuff and talks on to the USBTiny.

So when you tried it were you using the com0com loop back driver that's used on that page?

If you were then I'm not entirely surprised if you hit problems. What it's trying to do is pretty complex and has lots of potential for error.

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

That's true Cliff, Thanks for your Clarification aswell.
I am looking forwards to getting a proper STK500 from Atmel
or either a Jtag ice MK2 or 1.
i think i saw some the last time right on ebay.
but yes! the price is promising too especially the Ice MK2

Cheers

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

Quote:

or either a Jtag ice MK2 or 1.

At this stage in the game forget JTAGICEmkII. It has been effectively replaced by JTAGICE3 which sells for $99 rather than $299 but is better in every way. The only downside of ICE3 is that it can only be used with AS6 but as long as you use Windows rather than Linux that's not a problem.

As for the JTAGICE 1 (actually no "1", it's just "JTAGICE"). You can buy clones of this on ebay for $20..$30 or even build one using a mega16 for < $10 but you must realise that this can only JTAG to the very earliest models of AVR that had on chip debug. Things like mega16, 32, 64, 128, 169 etc. It won't help you with "modern" micros like 48/88/168/328 or 164/324/644/1284 or 640/1280/2560/1281/2561 or loads of other "modern" chips. So be ready to be limited to the "old dinosaurs" if you buy/make one.

BTW I'm surprised you didn't list Dragon as one of your possibles. It's $49 and will do all that JTAGICE3 does for half the price (though there are some "cost compromises" like it's not cased and doesn't come with connectors/cables/ etc).