Page 1 of 1

Free memory

Posted: Sun Sep 21, 2008 9:14 am
by rapid
Hi,
how can I see how much memory (RAM, FLASH) are still free after compiling?

Re: Free memory

Posted: Sun Sep 21, 2008 4:30 pm
by jmccorison
Do a build to hex or to the chip and at the bottom of the listing displayed on the screen it will show memory used, both in number and percent, with the amount free, based upon the chip, also listed.

Re: Free memory

Posted: Sun Sep 21, 2008 7:28 pm
by rapid
Hi,
no I canΒ΄t see it.
I think something am adjusted or the demo version doesnΒ΄t show that. :roll:

........
Compilation successful!

Return code = 0

Launching the linker/assembler...

C:\Programme\Matrix Multimedia\Flowcode_AVR\Tools\MX_bats\avrb.bat "C:\PROGRA~1\MATRIX~1\FLOWCO~2\Examples\Flowcode11.elf" "C:\PROGRA~1\MATRIX~1\FLOWCO~2\Examples\Flowcode11.hex"


C:\Programme\Matrix Multimedia\Flowcode V3\Examples>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\bin\avr-objcopy" -O ihex -R .eeprom "C:\PROGRA~1\MATRIX~1\FLOWCO~2\Examples\Flowcode11.elf" "C:\PROGRA~1\MATRIX~1\FLOWCO~2\Examples\Flowcode11.hex"

HEX file creation successful!

Return code = 0

FINISHED

.............____________

Re: Free memory

Posted: Mon Sep 22, 2008 8:13 am
by Steve
The AVR version of Flowcode does not create this data by default. But there is probably a way to do it by using some command-line switches when compiling/linking the code.

Re: Free memory

Posted: Mon Sep 22, 2008 8:55 am
by rapid
Hi Steve,
I think you are right, but I did not find the switch inside GCC.
Can you help me?

Re: Free memory

Posted: Mon Sep 22, 2008 2:39 pm
by Sean
I have found a way to obtain some meaningful memory useage information from GCC.

Unzip the attached avr-size.exe file into the Tools\bin folder of your Flowcode_AVR installation.
avr-size.zip
(174.28 KiB) Downloaded 417 times
Copy the following line into the avra.bat file in the 'Tools\MX_bats' folder of your Flowcode_AVR installation.

"%~dp0..\bin\avr-size.exe" -B -d %2

Place it above the first line containing '@ECHO.'. You can replace the -d switch with -x to have the segment data displayed in hex rather than decimal notation. The total useage is displayed in both dec and hex format regardless of the selected segment display format.