STK500.EXE--Required components for "installation"

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

I put together a PC program for field & shop firmware update of an AVR target. ATAVRISP or STK500 will be used to connect to the target. I run a batch file that invokes STK500.EXE with the correct "stuff".

I need a "modern" STK500.EXE that recognizes Mega88. The versions from AVRStudio 4.11 and 4.12 seem to work fine.

For "distribution" to an arbitrary target PC that just needs to run STK500.EXE, making the 45MB AVRStudio 4.12 package and the 8MB Service Pack 1 available is way overkill. But I can't figure out how to "install" STK500.EXE by hand, not being a Windows guru.

I tried this brute force method:
-- Copy STK500.EXE to a virgin PC
-- Fire it up
-- Get "missing DLL" message
-- Copy and register said DLL on the virgin PC
-- Repeat the last 3 steps till the messages go away

The problem is that it still doesn't work at that point--just kind of starts up and completes. So something is missing. Take the same (now semi-)virgin PC, install AVRStudio and the service pack, and all works fine.

Have any of you played this game to "install" STK500.EXE by hand?

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Lee,

I don't suppose you have Microsoft's Visual Studio installed do you? If you do then go to it's start menu group and the sub-group from there called "... tools". In that there is a program called "depends". If you run this just once on your PC then it installs a right-click context menu handler so that now, if you ever open an explorer window and right-click on a .DLL or .EXE file you have an additional menu entry "View dependencies...". If you use that on STK500.EXE you'll find that the dependencies are as shown in this screen dump I just took:

So the target machine will need all of these - some are Windows standard . DLL files while some are application specific and will need to be copied over.

Cliff

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

Thanks much, Cliff. I did have Depends (no diaper jokes about old guys) on my hard drive. A fresh install/upgrade of 4.12 shows a very similar list to yours. the exception is that my Win2k install does not list MSVCRT.

I didn't write down my log of the brute-force install, but in particular I remember it requiring STK500COMMON.DLL which Depends does not list.

I will try it again on a virgin machine.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Cliff--Here is a dump from moving latest STK500.EXE to a virgin WindowsXP Pro machine. Either the message from STK500.EXE is an old canned message and does not accurately reflect the real world, or Depends cannot pick everything up.

Quote:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Al>cd\

C:\>stk500
STK500 command line programmer, v 2.2 Atmel Corp (C) 2004-2005.

Error: Could not create Stk500Common layer
Error: Could not create hex file reader
Error: Could not create source buffer
Error: Could not create destination buffer
Fatal: Make sure 'AvrCommon.dll' and 'Stk500Common.dll' are properly installed

C:\>

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Lee,

I have to admit that I've only used "view dependencies" a bit in the past and it always gave me the limited answers I needed but I just noticed the "Profile" menu option which actually launches the program and catches any dynamic load calls. I just tried that on stk500.exe and got the following - the ones with the added "starburst" are additional enrtries that were added to the list after profiling (I also switched full paths on too)

Cliff

PS The red blob on kernel32 is apparently because it tries to access an IsTNT() function in that DLL that doesn't exist in my Win2K

Attachment(s): 

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

Hmmm--the short answer is that AVRCOMMON & STK500COMMON look like the only two pieces that would need to be added. But that didn't work on mu original machine--STK500.EXE did come up without complaint, but then exited without doing anything or giving any further report. That was a WindowsXP Home machine.

Off to find another virgin machine...

Thanks much for the legwork.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Lee,

I wonder if the DLLs have to be "registered" with Windows - you could try running them as input to regsvr32 - run it at a command prompt with no parms to see the usage. I know that a lot of install programs do this step (usually when you see it saying "registering DLLs") but I have to admit that as a bit of a luddite I don't actually know what this process achieves though I'm guessing that Windows keeps a database (in the registry?) of registered DLLs but whether this is just to make them easy to find (so their directory doesn't have to be in the PATH) or not I don't know?!?

Cliff

PS Actually, reading about DllRegisterServer which is what regsvr32 invokes for the selected DLL it sounds like it's maybe just the opportunity for the DLL to create any registry keys it later needs?

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

theusch wrote:

Off to find another virgin machine...
Lee

Does your employer know you're running around deflowering all the virgins???? :twisted:

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

You may also need to copy over the part description XML files -- at least the ones corresponding to the devices you're actually going to use.

If you go into "c:\Program Files\Atmel\AVR Tools\Partdescriptionfiles\" and move all the XML files from there into the Recycle Bin, STK500.exe will no longer list any supported devices with an invocation of "STK500.exe -?".

Restore the XML files, and re-run "STK500.exe -?" and the list of supported devices returns.

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

To Cliff--Yep, I registered each of the DLLs after copy.
To lf--That may very well be it. I wonder where a copied STK500.EXE expects to see them. Time to search for STK500 in the registry on a properly-installed machine (non-virgin ;) , already de-flowered) and see what I find.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.