avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] How often does your code not fit?


From: Ben Mann
Subject: RE: [avr-gcc-list] How often does your code not fit?
Date: Sat, 9 Jul 2005 09:57:23 +0800

Hi Ben,

 

My 2 cents…

 

As embedded developers we’re partly limited by the cost of the hardware and consequently both size and speed of microcontroller, so there is the usual tradeoff to be made when balancing code readability, compiled size, and execution speed. In custom applications the mcu is often selected to fulfill a specific job and it’s very rare to have a case where the code can’t fit as compiled – although I have had to tone down some overly-verbose debugging strings once or twice…

 

Probably the single biggest optimisation issue is in mixing and matching optimisations within the same application – so that non-critical code is compiled for smallest size, while time critical bit-banging is executed as quickly as possible. The archives contain a lot of cases where people have discussed this in the past.

 

And I suppose – if we entertain a lot of feature creep – then everyone ends up with space issues eventually.

 

From the point of view of developing custom equipment – the effect of a compiler producing efficient code is often accounted for very early in the project in the selection of hardware (and maybe compiler and schedule) which is usually a cheaper option than running the project late as the software is re-engineered to fit.

 

Either way the size does have a cost associated with it – maybe just not in the way I understood you meant.

 

Ben Mann

 


From: address@hidden [mailto:address@hidden On Behalf Of Ben L. Titzer
Sent: Saturday, 9 July 2005 5:44 AM
Cc: AVR GCC List
Subject: [avr-gcc-list] How often does your code not fit?

 

Hello everyone,

 

I am wondering about the space optimizations in avr-gcc. How many of you have had problems fitting your code into the device that you are working on, and what do you normally do? Is it a large enough problem that you have had to hack your source code, or turn on compiler optimizations, or do linker tricks?

 

I was wondering because I am interested in studying the effect of different optimization passes in avr-gcc on the code size of the program.

 

Have any of you had this problem, and how many of have had code size issues?

 

Thanks,

Ben Titzer

 

========================================================

The tools we use have a profound and devious influence on our thinking habits, and therefore on our thinking abilities.

--Edsgar W. Dijkstra

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]