AVRA installation

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

Hi guys, does anybody know what is the correct way to compile the AVRA source packages for:

 

- Linux

-Windows

 

as the instructions at http://avra.sourceforge.net/READ... are not really clear to me, thank you.

This topic has a solution.
Last Edited: Mon. Sep 4, 2017 - 09:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

AVRA's last update according to the webpage was in June of 2010.

 

If you are using Windows, why not simply install Studio?

 

Jim

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

Please Read: Code-of-Conduct

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

Last Edited: Mon. Sep 4, 2017 - 01:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The last change in the repository was 2012-08-18.

Some changes of note :

  • tiny20
  • mega1280
  • mega2560
  • mingw32

Linux - Debian does not build from the repository; current version is 1.3.0

Windows - appears that AVRA can be built using MinGW.

 

https://sourceforge.net/p/avra/code/commit_browser

https://packages.debian.org/search?keywords=AVRA&searchon=names&suite=all&section=all

http://mingw.org/

https://sourceforge.net/p/avra/code/ci/d9d66caf93749a1414f6a60d24bbe6d7005441b0/tree/Build

#!/usr/bin/env bash
#
# AVRA Build and Release helper script
# source this in the root directory of avra and then invoke one of the
# functions to create a release. This is very hackish, but makes life easier.

...

function avra-build-linux {

...

function avra-build-apple {

...

function avra-build-windows-mingw32 {

...

via commit browser and

Added mingw32 makefiles

Edits : typo, bash file

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Sep 4, 2017 - 02:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jim, I am working on my Master's thesis which requires me to include some atmel assembler command-line tool in my software bundle. Therefore, I need something opensource. Otherwise, on Windows I would just copy the avrasm2.exe from the Atmel Studio installation directory, but I suppose that the licence does not allow me to distribute with my software.

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

Hi, how do you mean that "Debian does not build from the repository"? What would be the problem, thanks.

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

avrmiso wrote:
 Master's thesis which requires me to include some atmel assembler command-line tool in my software bundle. Therefore, I need something opensource. 

Doesn't Atmel Studio use GCC ?

 

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

awneil wrote:

avrmiso wrote:
 Master's thesis which requires me to include some atmel assembler command-line tool in my software bundle. Therefore, I need something opensource. 

Doesn't Atmel Studio use GCC ?

 

 

does these helps ? they DO have source and they are almost up-to-date

http://www.atmel.com/tools/ATMEL...

http://www.atmel.com/tools/atmel...

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

Hi all, Atmel Studio includes both avrasm and gcc toolchain, probably for serving different syntaxes. As far as I am concerned, there are 2 - GCC syntax and Atmel syntax. What I would need is an opensource assembler for the Atmel syntax, which, Avra is. Or does anybody know how to convert the file in atmel assembly to the gcc syntax??? There should be different macro declarations and something like that...

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

On the whole the mnemonics are about 95% similar between Asm2 and avr-as so the only things that need "fixing" are the directives. Unless you are doing something particularly "exotic" (like Asm2 macros) then it's almost a one for one change. To do it you just need to read the two manuals side-by-side:

 

http://www.atmel.com/webdoc/avra...

 

https://sourceware.org/binutils/...

 

OTOH I guess AVRA is a possibility but as other have noted it's not going to include any AVR models released in the last 5 years.

 

TBH it's no clear to me why you would need to "distribute" a copy of the assembler anyway. Whatever software is used can you not tell the user of your .asm "oh and you need to use XYZ V123" and leave them to install it?

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

clawson wrote:
 can you not tell the user of your .asm "oh and you need to use XYZ V123" and leave them to install it?

Absolutely.

 

That, surely, is the way it's usually done - isn't it?

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

 ... and is there a particular reason for using ASM anyhow ... ?

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

awneil wrote:
... and is there a particular reason for using ASM anyhow ... ?
As we all know - it sorts the men from the boys! cheeky

 

(there's nothing clever about writing stuff in C but if you can do it in Asm you must be a "guru"!)

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

Yes this is a possibility but for the user convenience I wanted to bundle it. However, yes, I will probably just require them to download the tools.

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

The ones maintaining the AVRA package in Debian decided not to extract it from the repository whereas other related packages do come from the repository.

avrmiso wrote:
What would be the problem,
That's not a problem as one can build AVRA per its instructions though there is an AVRA bug report that describes the problem :

#72 Newest version not present in Ubuntu repository

https://sourceforge.net/p/avra/bugs/72/

 

Edit : bug

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Sep 5, 2017 - 05:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

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

Look at gavrasm. Open source (Pascal). http://www.avr-asm-tutorial.net/...

 

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

gchapman wrote:
That's not a problem as one can build AVRA per its instructions

The OP doesn't think so:

avrmiso wrote:
 the instructions at http://avra.sourceforge.net/READ... are not really clear to me

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

And to answer the original question, I took on, as an exercise, to build AVRA on Lunix.

 

Yes, the instructions on the page linked to are weird, and if you don't know anything about "Autotools" it's not easy to figure out what is actually needed to be done.

 

First a note: Since the latest AVRA sources are quite old now, they do not play all that well with Autotools. There are a few small fixes that needs to be made. In the src/ subfolder directory, create these files (e.g. as empty): NEWS. , README. , AUTHORS. ChangeLog. .

 

Now, still in the src/ subfolder, issue these commands in order. Some will produce warnings, but there should be no errors:

 

$ aclocal

$ autoconf

$ automake -a

$ ./configure

$ make

You should end up with an executable avra in the src/ folder:

 

$ ./avra
AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
Copyright (C) 1998-2010. Check out README file for more info

   AVRA is an open source assembler for Atmel AVR microcontroller family
   It can be used as a replacement of 'AVRASM32.EXE' the original assembler
   shipped with AVR Studio. We do not guarantee full compatibility for avra.

   AVRA comes with NO WARRANTY, to the extent permitted by law.
   You may redistribute copies of avra under the terms
   of the GNU General Public License.
   For more information about these matters, see the files named COPYING.

usage: avra [-f][O|M|I|G] output file type
            [-o <filename>] output file name
            [-l <filename>] generate list file
            [-m <mapfile>] generate map file

    .
    .
    .

Since I do not want to actually instyall AVRA I didn't do the last step, but it probably should work OK:

$ make install

 

That's it!

 


 

For Windows, I wonder what is hard to understand with the instruction given:

 

download then OpenWatcom C/C++ Toolchain for windows and create a new project and add the C and H files to it and compile.

 

No, I haven't tried it (yet ;-), but it sounds pretty straight forward.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Mon. Sep 4, 2017 - 06:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to say that depending on the ./configure it may need sudo for the install

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

And I did a build on Windows:

 

1. Download Watcom and install it (I went with the defaults all the way, you might want to select to install to e.g. "C:\Program Files (x86)\WATCOM" rather than the default  "C:\WATCOM"  ...)

2. Creaet a new project in Watcom (I created C:\Users\JohnDoe\Documents\WatcomProjects\AVRA.wpj, as a Win32 Character-mode Executable.)

3. Download the source file package (I downloaded avra-1.3.0.tar.bz2)

4. I unpacked the tarball to a subfolder to where I place the Watcom project file: C:\Users\JohnDoe\Documents\WatcomProjects\avra-1.3.0\

5. In Watcom I added all .c files and all .h files (Sources menu, New Source. Then browse to where the unpacked sources are, select *.c and Add all, select *.h and Add all. Then close the dialogue.)

6. I then did a build (Actions menu, Make all.)

 

I got a Windows executable that can run from a command line:

 

C:\Users\JohnDoe\Documents\WatcomProjects>avra
AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
Copyright (C) 1998-2010. Check out README file for more info

   AVRA is an open source assembler for Atmel AVR microcontroller family
   It can be used as a replacement of 'AVRASM32.EXE' the original assembler
   shipped with AVR Studio. We do not guarantee full compatibility for avra.

   AVRA comes with NO WARRANTY, to the extent permitted by law.
   You may redistribute copies of avra under the terms
   of the GNU General Public License.
   For more information about these matters, see the files named COPYING.

usage: avra [-f][O|M|I|G] output file type
            [-o <filename>] output file name
            [-l <filename>] generate list file
            [-m <mapfile>] generate map file
    .
    .
    .

No other tests done.

But it sure went smoothly on Windows! (-:

 

I'm sure it could b built with any other standards-compliant compiler with little changes to the sources. E.g. MS Visual C++ (which does C files just fine), GCC (possibly packed as a plugin to an IDE of your liking, e.g. Ecclipse, NetBeans, CodeBlocks...). But Watcom worked just fine. (-:

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

avrmiso wrote:
just copy the avrasm2.exe from the Atmel Studio installation directory, but I suppose that the licence does not allow me to distribute with my software.

Hmmm--is this a case off ASS-U-ME?

 

[IIRC the license state of Atmel's assembler just came up in the past week or so]

 

For many years, CodeVisionAVR has "bundled" Atmel's assembler; currently avrasm2.exe.  Special dispensation?  Dunno.  Have you asked support?

 

 

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

It's not just the exe. You need all the *def.inc to go with it too don't you ?

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

clawson wrote:

It's not just the exe. You need all the *def.inc to go with it too don't you ?

Well, perhaps OP does.  We don't know the nature of this research app.  CV doesn't use the standard chip-include.

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.