AS6: Save the build output?

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

Cross-post: http://www.at91.com/discussions/...

Is there a way to have Atmel Studio 6.x automatically record its build output to a file?

In particular, the memory usage sumary:

:
:
Done executing task "RunCompilerTask".
Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Extensions\Application\AvrGCC.dll".
Task "RunOutputFileVerifyTask"
   Program Memory Usage :  xxxxx bytes   xx.x % Full
   Data Memory Usage    :  yyyyyy bytes   yy.y % Full
Done executing task "RunOutputFileVerifyTask".

Of course it can be done manually - but is there a way to automate it?

MS doesn't help:

http://msdn.microsoft.com/en-us/...

This topic has a solution.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Dec 4, 2019 - 01:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know for certain but I assume that the entire build process is actually controlled by an invocation of msbuild. If so it would seem that you need to get the /filelogger option added to the invocation:

http://msdn.microsoft.com/en-us/library/ms171470.aspx

Then again maybe it isn't msbuild but as it's really VS2010 it seems likely. No doubt Morten/Dean can shed light...

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

We do dip into msbuild (just). This can be seem from the target files that is stored in <installdir>\vs which is the 'rule' file for msbuild. These files just sets up the order of the build, while the main grunt of the build is usually handed to the different toolchains through the UsingTask statements in the target files (see Compiler.target for example of how gcc is invoked). The different toolchains then contains the tasks that carries out the compilation (e.g. invoke make for instance for gcc).

It should be possible to call msbuild on a project file for instance, but it will then have to be told about the specific target files and some of the config variables used ( at least $(AVRSTUDIO_EXE_PATH) ). I'm not sure how this could be done, so that's up to those with enough spare time to investigate :)

I had a hunch about the /out flag for atmelstudio.exe, which creates a log when compiling with atmelstudio without a GUI (atmelstudio.exe /build <path to atsln file>), but it does not seem to do much when running studio normally. The build tab is also not part of the application log that is stored in appdata.

So, as far as I know, there's no easy way to dump the output of the build tab to somewhere...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

meolsen wrote:
as far as I know, there's no easy way to dump the output of the build tab to somewhere...

Is there a way to get just the memory usage summary?

I don't see it in any of the files left by the build - but am I just missing it?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Is there a way to get just the memory usage summary?

Into a file?
Idea, not tested: Add an extra run of the memory reporter in a post-build-step, redirected into a file.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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

That sounds worth a look...

Also, a suggestion on the other forum about devenv: http://www.at91.com/discussions/viewtopic.php/p,41719.html#p41719

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
run ... the memory reporter

How does one do that?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr-size usually works ;-)

For reasons I've never totally grasped (I think it may be to give AVR, ARM, UC3 a similar experience?) Atmel don't invoke avr-size with the -C option (like Mfile and AS4 do) but just the plain output. They pipe it to a file then run their own "mangler" on that to produce the % figures. Yet for the 8bit avr-size anyway you can get all that by giving -C and -mmcu= to it.

However it must be the version with Eric Weddington's -C patch. Now I'm not sure if the generic binutils that Atmel package have that or not. If not then lift the avr-size from WinAVR.

EDIT: I have Atmel's 4.8.1 toolchain for Linux and just tested the avr-size in that. It does support -C:

$ avr-size -C --mcu=atmega16 avr.elf
AVR Memory Usage
----------------
Device: atmega16

Program:     140 bytes (0.9% Full)
(.text + .data + .bootloader)

Data:          4 bytes (0.4% Full)
(.data + .bss + .noinit)

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

It seems that the -C is only available for the AVR8 version?
(well, that's the only one that documents it with the -help option)

The ARM version doesn't give the percentage usages:

   text      data       bss       dec       hex   filename
   1996      1072     12440     15508      3c94   GccBoardProject1.elf

http://www.at91.com/discussions/...

But the example I gave initially is from an ARM build:

: 
: 
Done executing task "RunCompilerTask". 
Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Extensions\Application\AvrGCC.dll". 
Task "RunOutputFileVerifyTask" 
   Program Memory Usage :  xxxxx bytes   xx.x % Full 
   Data Memory Usage    :  yyyyyy bytes   yy.y % Full 
Done executing task "RunOutputFileVerifyTask". 

So how do I get that??

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

So how do I get that??


As I say they have their own pst-processor. This is pied to a file:

  text      data       bss       dec       hex   filename
   1996      1072     12440     15508      3c94  

Then they know it has 32K (say) flash and 32K (say) RAM so they just display 1996/32768 * 100 % and (12440+15508)/32768 * 100 %

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

So how do I invoke that for the ARM (SAM D, to be specific) :?:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess the question could be restated as: how do I "manually" invoke the Task, "RunOutputFileVerifyTask" :?:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not sure you can - it may not be a "stand alone" but built into the depths of their system. If it were me I'd just do the same as them - pipe arm-size output and post process it. Should be about 10 lines of C.

Almost certainly quicker than trying to break out their process.

Actually I'd be tempted to do what Eric did in the patch for avr-size. Look at what he did there and just duplicate but with SAM devices to add -C to arm-size and then maybe push that back to the community/Atmel. The downside of such a patch is that once it mentions specific models it will need constant maintenance to keep adding new ones so maybe it should have been written to use a text file size.conf (as avrdude uses avrdude.conf) so that the user/packager can just introduce new device support by adding model number/flash size/RAM size as a line in a text file?

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

clawson wrote:
I'm not sure you can - it may not be a "stand alone"

As the output window says, it appears to be a DLL:
Quote:

Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Extensions\Application\AvrGCC.dll".
Task "RunOutputFileVerifyTask"
Program Memory Usage : 29728 bytes 11.3 % Full
Data Memory Usage : 9472 bytes 28.9 % Full
Done executing task "RunOutputFileVerifyTask".

I can see the DLLs in that Extensions\Application folder...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
it may not be a "stand alone" but built into the depths of their system.

So it is: https://www.avrfreaks.net/index.p...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi AVR_Masters,

 

Im trying to dump automatically the  RunOutputFileVerifyTask to an Output.txt file , but.....

 

Do you know how to get this lines, on the Post-Build event?

 

Task "RunOutputFileVerifyTask"
                Program Memory Usage     :    65480 bytes   25.0 % Full
                Data Memory Usage         :    13032 bytes   39.8 % Full
 Done executing task "RunOutputFileVerifyTask".

 

i appreciate your comments

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

What do you get if you make at the command line and pipe that?

 

Alternatively maybe try (admin) editing compiler.targets and add a pipe to the command there.

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

Or, if you want the full build output, you can have it be written to under Tools/Options/Status Management. Then I guess you could filter it with something if you only want the size output...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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


meolsen wrote:
 Tools/Options/Status Management.

Thanks - good to know!

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm... No not that one... Search for msbuild in the Option tree...

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

 

 

Just as well I posted the pictures, then!

 

laugh

 

This one?

 

 

EDIT

 

This is AS7 - not 6 (as in the original post from 5 years ago)

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Dec 4, 2019 - 01:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmh... Maybe it was the first one then?

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

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

There's nothing like an intuitive, easy-to-navigate UI ...

 

cheeky

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...