News:

;) This forum is the property of Proton software developers

Main Menu

Amount of memory when failed to compile due to lack of memory

Started by RGV250, May 09, 2021, 04:44 PM

Previous topic - Next topic

RGV250

Hi,
I have only once filled the device but it was a bit frustrating as it might have just been by a couple of bytes so a bit of streamlining might help. It is probably not possible but I wondered if the compiler could show the amount on a failed compile due to lack of space.

Bob

trastikata

What I do in this case is silly and not perfect but works for me.

- I copy the project to a new file, delete couple of Subs, so the file can compile and note the size in program bytes.
- Then I choose a subroutine which is still present in both version and delete it from the copied file
- Re-compile the copied file and note the program size in bytes again to estimate the Sub-routine size
- Remove the same subroutine from the original file and compile it.
- Add to the compiled size the size of the sub and I get an estimation of how much I am over.

Of course it is an estimate, depending on how many times the sub was called and if some directives were used before or not.   

John Drew

That's a good idea Bob. I think it may be very difficult to achieve because in order to know how much over it has to complete a compile. It would have to temporarily modify the device's memory size.

You could temporarily change the device to one with more memory but it would have to be of the same type/family e.g. 18f26K22 in place of a 18F25K22. Although even this mightn't work because the compiler may have a different strategy when dealing with larger memory sizes.

@trastikata I just comment out lines to get a rough idea of how much I need to trim.
John