data memory usage

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

Hi,

in my studio 6 i compile a program and get 1261 bytes of data memory usage. I wonder how does it count it, is it the highest point in the program? If there are few possible routes(i send command through usart), does it count the the most consumming possible?

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

Quote:
I wonder how does it count it, is it the highest point in the program?
No, it is only the ram usage known at compile time (global variables, etc.). It does not take into account automatic variables or stack usage.

Regards,
Steve A.

The Board helps those that help themselves.

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

In the meantime, try this extension for Atmel Studio 6.1 Morten and I are working on. Install it, compile your application then open Tools->Other Windows->ELF Symbol Sizes to see a list of all the program (FLASH) and data (RAM) items in your binary and their respective sizes. Click a symbol to jump to its definition.

It's a bit rough, but it works.

EDIT: See below.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

Last Edited: Mon. Apr 29, 2013 - 07:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rough is the only way for spare time coding :P

:: Morten

 

(yes, I work for Atmel, 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

thanks everyone for answering. i get "this is not a valid VSIX package". am i doing something wrong?

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

Damn, 'Freaks must be eating it or something. Direct download here:

http://fourwalledcubicle.com/fil...

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

Gytis,

Have a look at this page in the user manual :

http://www.nongnu.org/avr-libc/u...

in particular this diagram is very useful:

.data holds your initialized globals, .bss holds non-initialized globals (and statics) and your automatics are created on the stack with SP working back towards the end of .bss. Worry when they meet!

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

I've got it on my browser at the moment :wink:

my problem is that i use mega16 and i have to decide how much sram i need to chop to be safe. i use big buffers of 512 bytes, so i probably need to start here and lose some speed.
p.s. thats cliff's sd card program for mega32 with fatfs :wink:

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

abcminiuser wrote:
Damn, 'Freaks must be eating it or something. Direct download here:

http://fourwalledcubicle.com/fil...

- Dean :twisted:

i get this extension is not installable on any currently installed products :wink:

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

Somewhat silly question - but have you installed Atmel Studio 6.1 first?

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

:)
i have studio 6.0

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

SD (FAT) in a 1K RAM micro is extremely borderline. A mega32 could be a better choice.

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

Quote:

i have studio 6.0

Now there's you problem :P

:: Morten

 

(yes, I work for Atmel, 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

clawson wrote:
SD (FAT) in a 1K RAM micro is extremely borderline. A mega32 could be a better choice.

thanks
i'll try to look at petit fatfs, maybe it's not too difficult to make it work with mega16 as far as i already have everything soldered. if not, i'll go for a bigger chip.

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

I've used Petit (actually avr_boot from pfsample.zip) on a mega16 and it works nicely if you only want to read.

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

clawson wrote:
I've used Petit (actually avr_boot from pfsample.zip) on a mega16 and it works nicely if you only want to read.

what't wrong with writing? it consumes almost no resources even with all functions.

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

Sorry I mean if you use avr_boot as a starting point it is cut back to read only.

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

avr studio updated, program installed. now i am probably missing somthing obvious again.

Quote:
open Tools->Other Windows->ELF Symbol Sizes to see a list of all the program (FLASH) and data (RAM) items in your binary and their respective sizes. Click a symbol to jump to its definition.

it's not in the "tools", there is no "other windows".
can't find it anywhere else :?

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

Man, my memory's horrendous. It's under "View->Other Windows->ELF Symbol Sizes", not "Tools->Other Windows->ELF Symbol Sizes".

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

abcminiuser wrote:
Man, my memory's horrendous. It's under "View->Other Windows->ELF Symbol Sizes", not "Tools->Other Windows->ELF Symbol Sizes".

- Dean :twisted:


found it, thanks a lot :D

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

Just remember, it shows compiled sizes, which can change depending on optimization level and other settings. It will also potentially show symbols that are linked in from the core or other libraries, that don't have source code available (so clicking them will do nothing).

As I said, it's definitely a 0.2 release, so improvement suggestions welcome.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

How do you install the extension manually? The extension manager in AS6 only lists Atmel Gallery. I also could not install the VSIX file by opening it -- it said "This extension is not installable on any currently installed products."

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

eecsninja wrote:
How do you install the extension manually? The extension manager in AS6 only lists Atmel Gallery. I also could not install the VSIX file by opening it -- it said "This extension is not installable on any currently installed products."

just download studio 6.1 from atmel site and start the .exe file , it will do updating instead of installing itself. However, there seems to be a problem with 6.1, i cannot debug with my dragon(i found threads here with the same problem). :)