memory usage report

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

Hello,

How do I add the memory usage reporting to the new AVRGCC? I cant seem to get it working anymore :oops:

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL

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

Mfile or Studio ?

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

mfile? as in MakeFile ?
If you mean MakeFiles, yes. Can I use avr-studio too? I havent used avrgcc that much the past year. Did I miss something handy?
Because Id apreaciate to be able to create hex files without the need of too much MakeFile editing.

So first question is, how do i create filesize reports in makefiles,
second question is, how easy is it to compile from avr studio and create memory usage reports :P

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL

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

Well the bottom line is that you want to be using avr-size and, if using WinAVR, "avr-size -C" in fact. Studio shold invoke that automatically and a Makefile generated by WinAVR's Mfile utility should also be jnvoking this as a matter of course.

In the end you should be seeing something like this:

AVR Memory Usage
----------------
Device: atmega88

Program:     214 bytes (2.6% Full)
(.text + .data + .bootloader)

Data:          1 bytes (0.1% Full)
(.data + .bss + .noinit)


Build succeeded with 0 Warnings...

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

Not had the time to try your answer till this evening.

The program "Avr-size" works like a treat!

Thank you!

MY MICROCONTROLLER CAN BEAT THE HELL OUT OF YOUR MICROCONTROLLER /ATMEL

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

Note that you can use the Makefile Template that comes with WinAVR (see the \sample subdirectory). Just take that and modify it for your project, or just use AVR Studio as it generates the Makefile for you.