Volker
Super Member
- Total Posts : 176
- Reward points : 0
- Joined: 2007/01/29 03:00:06
- Location: Germany
- Status: offline
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
|
qhb
Superb Member
- Total Posts : 9999
- 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)
What mode are you using? (Free, Standard, Pro ?)
|
Volker
Super Member
- Total Posts : 176
- 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)
Hi qhb I use the Pro Mode.
|
qhb
Superb Member
- Total Posts : 9999
- 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)
|
Volker
Super Member
- Total Posts : 176
- 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)
|
JPortici
Super Member
- Total Posts : 1251
- 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)
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
|
mad_c
Super Member
- Total Posts : 1271
- 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)
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.
|
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)
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
|
mad_c
Super Member
- Total Posts : 1271
- 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)
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.
|
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)
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
|
JPortici
Super Member
- Total Posts : 1251
- 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)
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
|
miceduan
Super Member
- Total Posts : 252
- 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)
what is the major difference between MPLAB X 5.1 and 5.05?
|
NKurzman
A Guy on the Net
- Total Posts : 19116
- Reward points : 0
- Joined: 2008/01/16 19:33:48
- Location: 0
- Status: offline
Re: Code Size increasing after change to 2.00
2018/11/13 23:10:11
(permalink)
Read the release notes included with it.
|
JPortici
Super Member
- Total Posts : 1251
- 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)
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.
|