Hello

Today I tried to recompile an old project for a pic16f690 and the thing
was suddenly too big too fit in the pic :
  error: no target memory available for section "code_happyhourjuhe"

As I changed some of the code I tried to reduce the size, but I had to
remove the complete main function (half of the code) to make it compile.

After some drinking I had the idea to try the old compiler version I was
using back in 2011.

Here's a comparison of the estimated file sizes for different sdcc
versions.


SDCC : pic16/pic14 3.4.0/*rc1*/ #8960 (Mar 10 2014)

bin/obj/EEPROM.asm              ;          22+   12 =    34 instructions (
92 byte)
bin/obj/Globals_DEF.asm         ;           0+    0 =     0 instructions (
0 byte)
bin/obj/I2C_adapter.asm         ;        1061+  355 =  1416 instructions
( 3542 byte)
bin/obj/I2C_slave.asm           ;         164+   61 =   225 instructions (
572 byte)
bin/obj/IncSwitch.asm           ;          23+    7 =    30 instructions (
74 byte)
bin/obj/main.asm                ;        1060+  371 =  1431 instructions
( 3604 byte)
bin/obj/ServoFunctions.asm      ;         102+   32 =   134 instructions (
332 byte)
bin/obj/StoreLoadValues.asm     ;         231+   73 =   304 instructions (
754 byte)



SDCC 3.0.1 release

in/obj/EEPROM.asm              ;           22+   12 =    34 instructions (   92
byte)
bin/obj/Globals_DEF.asm         ;           0+    0 =     0 instructions (
0 byte)
bin/obj/I2C_adapter.asm         ;         917+  313 =  1230 instructions
( 3086 byte)
bin/obj/I2C_slave.asm           ;         155+   60 =   215 instructions (
550 byte)
bin/obj/IncSwitch.asm           ;          23+    7 =    30 instructions (
74 byte)
bin/obj/main.asm                ;        1041+  352 =  1393 instructions
( 3490 byte)
bin/obj/ServoFunctions.asm      ;         102+   32 =   134 instructions (
332 byte)
bin/obj/StoreLoadValues.asm     ;         240+   73 =   313 instructions (
772 byte)



SDCC 3.0.0 release

bin/obj/EEPROM.asm              ;          22+   12 =    34 instructions (
92 byte)
bin/obj/Globals_DEF.asm         ;           0+    0 =     0 instructions (
0 byte)
bin/obj/I2C_adapter.asm         ;         916+  175 =  1091 instructions
( 2532 byte)
bin/obj/I2C_slave.asm           ;         155+   54 =   209 instructions (
526 byte)
bin/obj/IncSwitch.asm           ;          23+    7 =    30 instructions (
74 byte)
bin/obj/main.asm                ;        1030+  201 =  1231 instructions
( 2864 byte)
bin/obj/ServoFunctions.asm      ;         100+   28 =   128 instructions (
312 byte)
bin/obj/StoreLoadValues.asm     ;         242+   41 =   283 instructions (
648 byte)


As you can see, the estimated file size of main.asm for example
increases by ~20% from version 3.0.0 (2.8 kb) to version 3.0.1 (3.4kb)
and another ~3% from version 3.0.1 to the version I last pulled from svn
(3.6 kB).

Did you introduce some new optimisation switches since version 3.0.0 or
changed default libraries or stuff?

The commandline I'm currently using looks like this :
  sdcc  -o bin/obj/main.o -mpic14 -p16f690 -D__16F690__ --use-non-free
--opt-code-speed -I./src -I../../lib/16F690  -c -c src/main.c

(the opt-code-speed or size switch does the same as ever, nothing)



The code compiles fine with version 3.0.0.

Thank for any advice!

Cheeeeers,
Oli


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to