Simulation&HEX AVRSTUDIO 3.22

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

I have to generate a .HEX file to program with AVRISP the AT90S8535.
With the AVRSTUDIO 3.21 It was possible to generate a .HEX file and to simulate on the ASM source. But with the new version (3.22) I have to generate an OBJ file to simulate on the ASM source, and after change the project setting to generate a HEX file to program the AVR.
Is it normal ? or is it a bug on my PC ?
Thank.
Vincent Malisova

admin's test signature
 

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

Hi Vincent,

This is normal. You had an .obj file before, too, but the old assembler would generate both .obj and .hex every time. Now you have to specify wether you want an object file or a .hex file. Please note that you can still run your .hex file in the simulator, but the format is limited for debugging purposes.

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature
 

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

Morten,
I found the "old" behaviour was a time saver too. Was there a good reason for the change?

Regards,
Colin

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

Hi Colin,

I haven't been able to reach the programmers who made this decision (they're on holiday), but I've requested this changed in later versions. I've began toying with the idea of implementing a batch file that can be inserted as "assembler path" in Project Options, but this may take some time. I'll see if I can make it. The assembler accepts -fI and -fO as parameters to specify .hex and .obj, respectively. I'll just have to try and remember how the DOS .bat files handle parameters. I need input filename, for instance.

Has anybody implemented something similar?

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature
 

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

Ok, I've done some hacking...
Studio provides a long list of parameters to avrasm32, with the name of the source file apparently right at the end. A dos batch file only knows about 9 parameters, and so never gets the source file name. So you can't make a generic batch file to do the job. However you can make a batch file which you modify for each project which works. If the source file is "test.asm" then make a batch file "asm.bat" containg the following two lines:

avrasm32 -fO -l test.lst -m test.map -e test.eep test.asm
avrasm32 -fI test.asm

The first line creates the object file, list file, map file & eep file for avrstudio. The second line creates the hex file. Put the batch file in your project directory, and change your project settings to use it as the assembler.

Regards,
Colin

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

Hello all,

Morten, I would really be glad to learn why that change happend from 3.21 to 3.22. I had noticed that at work but at home it was gone (since I use 3.21 at home and 3.22 at work). I was already worried about insanity chasing me already so I did not follow the problem.

I would strongly propose to care about that issue in the next version. I would hate it if I would have to stick to an older version of a software because the newer one is worse than the older one.

Have fun everyone.

admin's test signature
 

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

Hello,

Duly noted, Herbert. This is already on the to do-list ;) The new assembler is not "worse", though. It just doesn't automatically run twice, to produce both files. The batch-file further up in this thread might work (I haven't tried it yet), and the support group will certainly root for the option all of you have requested when the time comes for a new release.

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature