Hot!Code Size increasing after change to 2.00

Author
Volker
Senior Member
  • Total Posts : 149
  • Reward points : 0
  • Joined: 2007/01/29 03:00:06
  • Location: Germany
  • Status: offline
2018/10/24 01:14:16 (permalink)
0

Code Size increasing after change to 2.00

Hello
 
I have a project which fills 13% of code space with XC8 V1.44.
Now i changed to XC8 V2.00 and the code space is 23% used.
 
Is this increasing of code space usage right?
 
Thanks
#1

13 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 7545
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/24 01:47:18 (permalink)
    +1 (1)
    What mode are you using?
    (Free, Standard, Pro ?)
     
    #2
    Volker
    Senior Member
    • Total Posts : 149
    • Reward points : 0
    • Joined: 2007/01/29 03:00:06
    • Location: Germany
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/24 02:52:44 (permalink)
    0
    Hi qhb
     
    I use the Pro Mode.
    #3
    qhb
    Superb Member
    • Total Posts : 7545
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/24 03:00:17 (permalink)
    +1 (1)
    and, C90, or C99 mode?
     
    #4
    Volker
    Senior Member
    • Total Posts : 149
    • Reward points : 0
    • Joined: 2007/01/29 03:00:06
    • Location: Germany
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/24 06:25:30 (permalink)
    0
    C90 mode
    #5
    JPortici
    Super Member
    • Total Posts : 433
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/24 06:45:32 (permalink)
    +1 (1)
    Try to compare the disassembly listing files generated by the old and the new version.
    In my case i found out that the C standard library functions produced a different (bigger) assembly output
    #6
    mad_c
    Super Member
    • Total Posts : 1115
    • Reward points : 0
    • Joined: 2010/12/12 17:48:27
    • Location: Brisbane, Australia
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/10/28 19:44:14 (permalink)
    +1 (1)
    Volker
    I have a project which fills 13% of code space with XC8 V1.44.
    Now i changed to XC8 V2.00 and the code space is 23% used.
     
    Is this increasing of code space usage right?
     

    If you are building for C90, then I would be surprised by such an increase. The code size will vary from version to version, but the percentage change should be small. If, on the other hand, you were compiling using the new C99 libraries, then this change is entirely possible. Also check to make sure the optimizations are similar. The options for the 2.0 compiler optimisations are very different to those used with 1.x. Just verify that you are building with similar settings to how you were previously, then, as suggested, check the listing files if you are still seeing a large increase.
     
    Jeff.
    #7
    Geoff Baldwin
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/11/05 02:15:49
    • Location: 0
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/06 00:20:20 (permalink)
    0
    Also installed XC8 V2
    Running Free mode C90
    Build was 78% with V4
    Unable to build on V2  insufficient program space.
    Yes.. Pay for license...our exchange rate is 14$1...  bigger memory is cheaper on small production runs
    #8
    mad_c
    Super Member
    • Total Posts : 1115
    • Reward points : 0
    • Joined: 2010/12/12 17:48:27
    • Location: Brisbane, Australia
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/06 13:49:36 (permalink)
    +2 (2)
    Geoff Baldwin
    Also installed XC8 V2
    Running Free mode C90
    Build was 78% with V4
    Unable to build on V2  insufficient program space.

    Hi,
     
    What optimizations have you turned on with v2? Make sure you are running with level 1 and have local turned OFF. There was nothing done internally that would substantially increase the code size; however, bug fixes and the like might increase it a little. If you can wait for 2.05, the situation for uses of the Free product will improve.
     
    Jeff.
    #9
    Geoff Baldwin
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/11/05 02:15:49
    • Location: 0
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/06 22:26:34 (permalink)
    +1 (1)
    Installed MplabX 5.1 and now it builds on V2. (wouldn't on 5.05)
    Had level 1 optimization, but Local "ON". 93% on V2
    was 81% on XC8 V1.45
    Now with level 1 & Local "OFF"   80% 0n XC8 V2.0
    Thank you
     
     
    #10
    JPortici
    Super Member
    • Total Posts : 433
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/07 23:18:41 (permalink)
    +1 (1)
    Interesting enough, the average size of my projects have remained the same, plus or minus 100 words MAX. I have updated about 20 of them
     
    But...
    -no floating point (there is a thread on how 2.00 has worse floating point performance at least in terms of flash size)
    -no use of standard c libraries, only stdint and stdbool headers. (i did notice a slight increase in size with string functions)
    i have to re-check if bools are slightly increasing or decreasing code size, but the cleaner more logical code is still worth it
     
    Have you tried to compare the disassembly listing files to see which functions gets increased in size?
    post edited by JPortici - 2018/11/07 23:24:06
    #11
    miceduan
    Super Member
    • Total Posts : 247
    • Reward points : 0
    • Joined: 2007/09/29 15:47:37
    • Location: Canada
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/13 23:02:07 (permalink)
    0
    what is the major difference between MPLAB X 5.1 and 5.05?
    #12
    NKurzman
    A Guy on the Net
    • Total Posts : 16573
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Code Size increasing after change to 2.00 2018/11/13 23:10:11 (permalink)
    +3 (3)
    Read the release notes included with it.
    #13
    JPortici
    Super Member
    • Total Posts : 433
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: Code Size increasing after change to 2.00 2018/11/13 23:40:16 (permalink)
    +2 (2)
    Particulary the sections "What's new in 5.10" and "Repairs/Enhancements in 5.10"
    Keep in mind that a MPLAB X update also updates the simulator, the assembler and all the tools which have their separate changelogs.
    #14
    Jump to:
    © 2018 APG vNext Commercial Version 4.5