AVR Assembler 2.0 Beta released

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

AVR Assembler 2.0 (AVRASM2) is released for public beta testing. More
information and download links here:

https://www.avrfreaks.net/Tools/s...

Please read the accompanying documentation for a description of new
features, known issues, etc. The document is also separately available at:

http://www.atmel.com/dyn/resourc...

This beta release is an add-on package for AVR Studio 4.09. It will
install AVRASM2 alongside with the current AVRASM. Selection
between the two assemblers is done by selecting "AVR Assembler Setup"
from the Project menu in AVR Studio.

Please note that at the current time, the assembler options are
global, not a per-project option.

All feedback for this beta release is welcome, in this forum or e-mail:

avrbeta@atmel.com

Roland Kruse
Atmel AVR Tools

Please don't report bugs in private forum messages.
--
Roland Kruse
Atmel AVR Tools

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

NICE, it shows alot more intellegince in seeing errors than the previous assembler! 8)

However, I'm getting a wierd error on a macro. Granted, this is code generated from Codevision, but I don't see any reason why it shouldn't work.

315     .MACRO __PUTBMRN
316     STS  @0+@1,R@2
317     .ENDM

4679     ;1688                      weight[1] = b;
4680     __PUTBMRN _weight,1,17

main.asm(316): error: syntax error, unexpected INTEGER
main.asm(4680): macro __PUTBMRN called here

Line numbers included on the left.

BTW, sure would be nice to have the errors inline with the code in the .lst file. :wink:

John Holcomb

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

JShadow wrote:
NICE, it shows alot more intellegince in seeing errors than the previous assembler! 8)

However, I'm getting a wierd error on a macro. Granted, this is code generated from Codevision, but I don't see any reason why it shouldn't work.

315     .MACRO __PUTBMRN
316     STS  @0+@1,R@2
317     .ENDM

4679     ;1688                      weight[1] = b;
4680     __PUTBMRN _weight,1,17

main.asm(316): error: syntax error, unexpected INTEGER
main.asm(4680): macro __PUTBMRN called here

Line numbers included on the left.

BTW, sure would be nice to have the errors inline with the code in the .lst file. :wink:

Thank you for your feedback

I have verified the problem. It's probably caused by the assembler having started to parse "R@2" berfore @2 has been replaced, and ending up with two tokens (R and 17) iinstead of one (R17).

BTW, I tested that code with some of our older assemnblers as well, and all of them choked on it, so this is hardly a new problem. The only assembler I tested that did it correctly was the open-source avra assembler. :D

I agree with you, this should work. I'll look into it later to see if it can be fixed.

As for your second point, this is a known problerm and some improvements in error messages and list file generation are still planned..

Roland Kruse
Atmel AVR Tools

Please don't report bugs in private forum messages.
--
Roland Kruse
Atmel AVR Tools

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

Hrm...actually I've been using avrasm32 version 1.52(which comes with codevision) for some time and the above code has been assembling without error.

:wink:

John Holcomb

Last Edited: Sat. Jul 3, 2004 - 08:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

comments in #define seem to only work using C comments :-

#define Test 2 ; Test=2

Test evaluates to "2 ; Test=2"

#define Test 2 // Test=2

Test evaluates to "2"

HTH

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

JShadow wrote:
Hrm...actually I've been using avrasm32 version 1.52(which comes with codevision) for some time and the above code has been assembling without error.

:wink:

OK. I don't have that version available. (but it failed with 1.53)

Anyway, I have fixed this in avrasm2 for the next beta version.

Roland Kruse
Atmel AVR Tools

Please don't report bugs in private forum messages.
--
Roland Kruse
Atmel AVR Tools

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

prime wrote:
comments in #define seem to only work using C comments :-

#define Test 2 ; Test=2

Test evaluates to "2 ; Test=2"

#define Test 2 // Test=2

Test evaluates to "2"

HTH

This behaviour is intentional, and I think it is correct (but I guss we could have an argument about that :wink: )

This is one of the dilemmas caused by implementing a preprocessor designed for one language (C) for a quite different language (assembly).

One of the potential uses of supporting C preprocessor syntax in the assembler is to be able to share header files between C and assembly (to some degree, at least). Consider the different meaning of ';' in C and assembly.

Anyway, at the very least this behaviour should be documented. :)

Roland Kruse
Atmel AVR Tools

Please don't report bugs in private forum messages.
--
Roland Kruse
Atmel AVR Tools