External Tools - Arguments for AVR Studio 4

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

 

Hi Freaks,

 

First of all I'm using Atmel Studio 7 since years having integrated my s'AVR tool for structured AVR assembly programming, which works quite well.

After I have saved my *.s source file(s), I simply click the s'AVR shortcut:

 

 

and a few msec later all *.s files are (pre)compiled (to flat AVR assembly language) so I can click the Build icon to do the rest as usual (which takes slightly more time).

So far, so (very) good.

 

Don't blame me: I have been asked to integrate my s'AVR software tool into ancient AVR Studio 4.19, which behaves different regarding the tools setup compared to Atmel Studio 7.

In Atmel Studio 7 the wanted arguments are passed to my program (and other external software tools) like this, for example:

 

 

Or slightly more complex arguments if a single design file (file extension .s) should be compiled: /$(ItemDir)$(ItemFileName).s/$/parameter1/$/parameter2

The "Initial directory" is always declared as: $(ItemDir) or $(ProjectDir).

 

Obviously these $(...) based parameters are macros for Visual Studio, which don't work with AVR Studio 4. Isn't AVR Studio 4 based on Visual Studio 2005?

However, pure static arguments like "/parameter1 /parameter2" (no $ characters etc., spaces in-between) are transferred as expected.

Also if I add the true file name and the complete directory path in Arguments (for test only), it will be transferred and it works as expected.

 

But this is valid only for a given fix file name in a given fix file directory.

The intention of such a tools setup is to automatically pass both the complete path + file name dynamically (both the directory and the filename can change) so the external software tool can be executed without any extra intervention by hand, just by clicking the corresponding tools button.

 

Q: How can varying design file names (being opened by AVR Studio 4) and the current corresponding design file directory be transferred automatically under AVR Studio 4 by using the tools arguments (similar to "/$(ItemDir)$(ItemFileName).s" under Atmel Studio 7)?

 

I have tried many different variants, but without success. Also I couldn't find any relevant external tools setup documentation.

Hopefully any AVR Studio 4 guru still remembers, how to make the wanted tools arguments working as expected. At least the equivalent $(ItemDir) would help already.

 

Thanks for your assistance.

 

This topic has a solution.
Last Edited: Thu. Apr 22, 2021 - 05:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

s'AVR wrote:
Obviously these $(...) based parameters are macros for Visual Studio, which don't work with AVR Studio 4. Isn't AVR Studio 4 based on Visual Studio 2005?
No Studio 4 predates Atmel's involvement with Microsoft. As far as I know it's their own GUI written from the ground up. So don't expect "meta-variables" or anything fancy like that.
s'AVR wrote:
But this is valid only for a given fix file name in a given fix file directory.
Yup, that is all you will have.

 

I don't know if AS4 had any capacity for "custom build steps" but after the main build I guess you could have it run some kind of script (Python perhaps) to put things into the places and names the external command has fixed?

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

Thank's  for your quick reply.

 

Hm, that's bad. I wonder (and cannot believe) that AVR Studio 4 does not support "dynamic" parameters as arguments.

This simple feature communicating via the DOS style command line interface (CLI) has been used by Windows programs for decades.

 

Nevertheless, it looks like I just found a solution, which would help partially:

 

I improved my s'AVR program simply using the current Windows directory in the given situation (not receiving at least the current design directorry via CLI), which obviously is the current project directory (surprise!) and search for the wanted *.s file(s), which seems to work (not fully tested yet).

 

Just compiling a single source file only, being currently selected within AVR Studio 4 (the external tools argument $(ItemFileName).s in Atmel Studio 7), I’m not able to detect without receiving it's name by the wanted CLI Argument (at least I don’t know how to do).