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
junix
PostPosted: Nov 14, 2011 - 02:09 PM
Newbie


Joined: Jul 30, 2004
Posts: 1


Hello together

I just spent hours for searching the reason why every dialog that needs communication with the AVR chip (AVR Programmer and debugging) gives me the message "An unknown emulator error occured."

Now I got a final solution to this problem. As I did not find any useful information on that issue yet, I'd like to share my solution with you.
If you are interested in the reasons why everything happens, just read on. For the quick readers a "solution cookbook" is at the end of this post.

The problem was: The firmware in the emulator did not fit for AVR Studio 5. As simple as it seems, as mean it is to detect this issue because the AVR Studio Firmware upgrader is lying to you. - Well actually the upgrader is keeping a secret rather than lying.

The upgrader does not tell you that it could not access necessary files for checking the emulator version. - What's the reason for that?

The upgrader trys to read the firmware archive (stored in <AS5 Installation Path>\tools\JTAGICEmkII where the install path is typically below C:\Program Files ) and opens this file requesting read and write access. Unfortunately as a normal user - especially in managed environments - you are not allowed to write anywhere in the Program Files-Folder. So the request of the upgrader is canceled by the operating system.

The upgrader now decides to not bother the user with error messages and keeps this fact as a secrett instead. The only indication you have is the fact that there is no status displayed beside your device in the list of devices the Firmware upgrader shows (nothing is displayed). But would you expect a status if you don't know that there has to be a status? - Well I didn't Wink

So that's the whole story. What workarounds do you have? See the two possible solutions below:

A solution cookbook (1/2)
You can help the upgrader manually:

  1. Copy the file jtagicemkii_fw.zip for the installation directory of AS5 to your "My Documents"-Folder
  2. Start the Firmware upgrader from the "Tools"-Menu
  3. After the upgrader detected your JTAGICE, click on the down-arrow on the right hand side of your device description (something like "JTAGICE mkII on ...")
  4. Press the "File"-Button and choose the file jtagicemkii_fw.zip in your "My Documents" folder
  5. The Firmware upgrader shows now a status on the right hand side of the arrow button you clicked in stepĀ 3. The status tells you if it's "Up to Date" or if an upgrade is needed or recommended.
  6. Now you are able to upgrade your JTAG ICE mkII

Warning: You have to do this everytime you use the upgrader or refresh the list of devices as the upgrader forgets this setting.

A solution cookbook (2/2)
Change the rights for the tools folder.

  1. Locate the tools folder of AVR Studio (in this example we assume the folder as C:\Program Files\Atmel\AVR Studio 5.0\tools\JTAGICEmkII )
  2. Now find out what user you are or what group the users of the AVR Studio are in (We assume the group is Users here).
  3. Open a privileged command prompt and execute the following command using the appropriate parameters for the path and the user/group:
    Code:
    CACLS "C:\Program Files\Atmel\AVR Studio 5.0\tools" /T /e /p Users:F


Unfortunately this workaround has a flaw too: Ever user is now able to destroy the firmware repository of the AVR Studio. But I think that's not really a problem.

I hope this helps others who are searching for a solution to this problem.

Regards
junix

_________________
Let's face it: any idiot can write code.
 
 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