|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Compiler Optimizations
Quote:
|
|
#3
|
||||||
|
||||||
|
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
|
|||
|
|||
|
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".
|
|
#5
|
||||
|
||||
|
Re: Compiler Optimizations
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |