Free memory

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
rapid
Posts: 5
Joined: Sat Sep 20, 2008 9:05 am
Contact:

Free memory

Post by rapid »

Hi,
how can I see how much memory (RAM, FLASH) are still free after compiling?

jmccorison
Posts: 26
Joined: Mon Aug 18, 2008 11:47 pm
Location: Orcas Island, WA
Contact:

Re: Free memory

Post 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.

rapid
Posts: 5
Joined: Sat Sep 20, 2008 9:05 am
Contact:

Re: Free memory

Post 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

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

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Free memory

Post 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.

rapid
Posts: 5
Joined: Sat Sep 20, 2008 9:05 am
Contact:

Re: Free memory

Post by rapid »

Hi Steve,
I think you are right, but I did not find the switch inside GCC.
Can you help me?

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Free memory

Post 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 368 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.

Post Reply