Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
desoky725
PostPosted: Apr 27, 2012 - 10:48 PM
Rookie


Joined: Feb 15, 2011
Posts: 24


when I build a program in avr studio 4 it output this

Device: atmega8

Program: 1906 bytes (23.3% Full)
(.text + .data + .bootloader)

Data: 26 bytes (2.5% Full)
(.data + .bss + .noinit)

And when I copy the program to avr studio 5 it output this

Device: atmega8
Program: 2324 bytes (28.4% Full)
(.text + .data + .bootloader)
Data: 26 bytes (2.5% Full)
(.data + .bss + .noinit)
 
 View user's profile Send private message  
Reply with quote Back to top
Koshchi
PostPosted: Apr 28, 2012 - 01:58 AM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13815
Location: Vancouver, BC

Are you compiling for the same optimization level? Are you linking with the same libraries?

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
Torby
PostPosted: Apr 28, 2012 - 04:59 PM
Raving lunatic


Joined: Nov 11, 2003
Posts: 3852
Location: Chicago Illinois USA

I noticed one of my tiny programs grew 2 bytes going from studio 4 to studio 6. Went back to the original size when I set "Release" rather than "Debug" on the project properties.

_________________
Discursive design,

Torby

Some days, it's just not worth chewing through the restraints.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
desoky725
PostPosted: Apr 28, 2012 - 09:50 PM
Rookie


Joined: Feb 15, 2011
Posts: 24


I don't Know how to set optimization level
can you guide me
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Apr 28, 2012 - 10:39 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18527
Location: Lund, Sweden

Right-click the project node in the Solution Explorer tree, and select Properties.

At the left, select the Toolchain tab.

In the tree view just to the right of the tabs, expand AVR/GNU C node, and select the Optimization node.

In the drop-down Optimization Level, select the desired optimization (-Os recommended if you dont have good reasons for another selection.)
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits