Hi mE team,
Is there some reason (other than aesthetic) that code is now placed in flash according to size, i.e. smaller procedures following bigger ones? Previous organisation with main at the end, and ISRs at the beginning of ROM, made more sense.
The assembly listing is now disorganised (or rather organised as always, just addresses do not follow it anymore) making it hard to use the org directive safely (it's next to impossible to follow changes in code organisation after some procedures are org'ed). The new code placement leads also to unexpected results - like two ISRs localised on opposite ends of flash.
Can we have the old code placement back, please? (Grouping by libraries and units would be ideal, but that's probably too much to ask .)
ver 8.3 code placement in flash
Re: ver 8.3 code placement in flash
The new placement guarantees that less space will be wasted, i.e. the routines fit better.
As for the LST file, we will work on it to be organized better, I just added it to the wish list.
Thanks.
As for the LST file, we will work on it to be organized better, I just added it to the wish list.
Thanks.
Re: ver 8.3 code placement in flash
That could be true, at least for smaller PICs - provided linker places code fragments so that it minimizes page switching.zristic wrote:The new placement guarantees that less space will be wasted, i.e. the routines fit better.
It shouldn't matter in PIC18s, though - if the linker can order routines from biggest to smallest, it can do it any other way, as well . I'd rather have it the old way, or, ideally, groupped by libs and units.
As for the smaller PICs - I've performed a test for GLCD example (EasyPIC5, PIC16F877A, same libs used for both compiler versions) and here are the results - rather contradicting your thesis .
Code: Select all
v 7 v 8.3
ROM 4393 4546
page switching 116 267
instructions
Note also, that the increase in code size almost exactly fits the number of added page switching instructions so it's the sole reason of code bloating - with no visible savings due to new way of code placement.
Concluding, instead of lower ROM usage we have another source of code bloating (for smaller PICs) plus a mess in assembly presentation. Is it really worth the nice look in statistics window? Or am I missing some real reason the new code placement was introduced for?
-
- Posts: 553
- Joined: 27 Feb 2006 17:00
- Location: Argentina
- Contact:
Re: ver 8.3 code placement in flash
Make it selecctable please. Let the user the chances to make that optimizations.zristic wrote:The new placement guarantees that less space will be wasted, i.e. the routines fit better.
As for the LST file, we will work on it to be organized better, I just added it to the wish list.
Thanks.
Donald Shimoda.