Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/28/03 17:29
Read: times


 
#37539 - RE: SDCC Vs RAID Vs KEIL
Hi, I got this mail posting from my friend.
This is really interesting ....... !


Can anybody answer my question?
After compilation of a program source file with the
usage of SDCC and converting it with HEX2BIN a binary
file by the size of 9781 bytes is created.
However at translation of the same file with the usage
of Keil C there is a file by the size of 2768 bytes.
Is it possible to reduce a file size and how to do it?





By: henrik05 ( Henrik Holm )
RE: Size of compiled file
2001-09-04 01:12
My guess would be that Keil is this more effictive...
Some time ago I tested varius C-compilers for the x51
micro controller series and Keil generated the
smallest binary images (which is the most important
trait for the compiler I need).
The results of my small tests are here, all compilers
was run with optimize size. I was unable to compile
the code I used with SDCC so it havent been included..
The warnings are from unused variables as far as I
remember:
-------
IAR8051 Compiler:
Errors: none
Warnings: none
Code size: 1433
Constant size: 0
Static variable size: Data(1) Idata(0) Bit(0) Xdata(0)
Pdata(0) Bdata(0)

RIDE 51 version 6.1.3 ( http://www.raisonance.com )

MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1607 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 1 40
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.

RC51 COMPILATION COMPLETE. 0 WARNING, 0 ERROR

KEIL C51
C51 COMPILER V6.10, COMPILATION OF MODULE
REMOTECOMMAND
COMPILER INVOKED BY: C:KEILC51BINC51.EXE XXXX.c
OPTIMIZE(SIZE) DEFINE(REMOTE) DEBUG OBJECTEXTEND

MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1387 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 1 43
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE. 4 WARNING(S), 0 ERROR(S)


By: hway ( Toni Räsänen )
RE: Size of compiled file
2001-09-05 05:17
As much as I would like to use SDCC (gotta love
makefiles that work properly), bugs (esp. one that
causes simple "for (i = 0; i < 8; i++) func(i+1,
arr[i]);" loop to run inifinitely (still present in
2.3.0, don't have the files handy so I don't post it
yet) -- not peephole optimizer's fault) .. force me to
use keil's compiler...

It's no wonder sdcc generates huge code. Take a look
at code generated for accessing code memory (arrays,
esp. multidimensional ones) (with size < 256 bytes).
Or a simple static struct. Code generated is simply
horrible. And then there's truckload of not-so-obvios
places that could be optimized away...

But nevertheless, I still would prefer the code
generated to be *correct* instead of most efficient,
for now...

</slight rant>






By: johanknol ( Johan Knol )
RE: Size of compiled file
2001-09-05 07:07
> bugs (esp. one that causes simple "for (i = 0; i <
8; i++) func(i+1, arr[i]);" loop to run inifinitely
(still present in 2.3.0, don't have the files handy so
I don't post it yet

Instead of howling to the moon, you'd better just do
that. I can't reproduce this, so maybe, just maybe,
you did something wrong?

Johan


By: hway ( Toni Räsänen )
RE: Size of compiled file
2001-09-11 00:43

Well, dunno what I did, but now I couldn't get the
softare to hang in simulator anymore.
Too bad I can't say the same of the real hardware...
Now I *really* wish I had an ICE handy... (no, it's
not the loop, I haven't pinpointed yet what exactly is
the problem...)

karthik bala guru
tkarthikbalaguru@yahoo.co.in




List of 9 messages in thread
TopicAuthorDate
SDCC Vs RAID Vs KEIL            01/01/70 00:00      
   RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
      RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
RE: SDCC Vs RAID Vs KEIL            01/01/70 00:00      
Reduce file size            01/01/70 00:00      

Back to Subject List