Go to Post People don't lead because they are chosen to lead; they are chosen to lead because they lead. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-02-2005, 21:36
Robby's Avatar
Robby Robby is offline
Registered User
AKA: Kevin Beranek
FRC #0269 (Cooney Robotics)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 47
Robby has a spectacular aura aboutRobby has a spectacular aura about
Compiler Optimizations

Has anyone used the compiler optimizations? If so, which have you used? and have you had any problems with them?

I recently ran out of space on the controller, I rewrote quite a bit of code to optimize it, i got rid of all the unnecessary stuff and continued coding. I then ran out of space again. There is very little that i can do to compact my code even further, so i decided to try the compiler optimizations. I managed to get a significant improvement in size, from 99% to 89%, but i was wondering if there is anything i should be aware of, as i have not yet tested the new code on a robot. Is there anything that the compiler does in optimizations that might mess stuff up?
  #2   Spotlight this post!  
Unread 22-02-2005, 21:42
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Compiler Optimizations

Quote:
Originally Posted by Robby
Has anyone used the compiler optimizations? If so, which have you used? and have you had any problems with them?

I recently ran out of space on the controller, I rewrote quite a bit of code to optimize it, i got rid of all the unnecessary stuff and continued coding. I then ran out of space again. There is very little that i can do to compact my code even further, so i decided to try the compiler optimizations. I managed to get a significant improvement in size, from 99% to 89%, but i was wondering if there is anything i should be aware of, as i have not yet tested the new code on a robot. Is there anything that the compiler does in optimizations that might mess stuff up?
For FIRST purposes, optimizations don't really present any special problems unless you are doing special things like debugging inline assembly.
__________________
1139 Alumni
  #3   Spotlight this post!  
Unread 23-02-2005, 01:29
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Compiler Optimizations

if you enable all the compiler optimizations, make sure that anything volatile is declared volatile explicitly. You can get away without it with no optimizations (at least some times), but not with all the optimizations enabled.

I fought that at least a few times this weekend.
  #4   Spotlight this post!  
Unread 23-02-2005, 11:26
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Re: Compiler Optimizations

If you are running short of data space (RAM) be sure to declare the command_list array in commands.h as "rom".
__________________
Don Reid
  #5   Spotlight this post!  
Unread 23-02-2005, 11:36
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Compiler Optimizations

Quote:
Originally Posted by Don Reid
If you are running short of data space (RAM) be sure to declare the command_list array in commands.h as "rom".
Probably a good idea even if you're not short on RAM, since it will take up space in FLASH regardless of whether it's declared "rom" or not.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nasty Compiler Bug Matt Leese Programming 5 18-02-2005 18:44
using alternative compiler Leav Programming 2 18-01-2005 15:30
IMPORTANT regarding the new C Compiler dlavery General Forum 12 14-01-2005 05:05
Makefile and stripped down compiler Venkatesh Programming 0 09-01-2005 18:55
C compiler for 2004 Tim Skloss Technical Discussion 11 05-11-2003 22:02


All times are GMT -5. The time now is 20:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi