e-Paper icon indicating copy to clipboard operation
e-Paper copied to clipboard

Rohoog/compile opt

Open rohoog opened this issue 4 years ago • 1 comments

This changes the optimization flag -O0 (no optimization) to -O and uses -ffunction-sections and -fdata-sections in combination with --gc-sections for linker to remove unused parts of the example code from the binary. After stripping and leaving only one demo (the typical situation), binary will be reduced to about 64KB (on aarch64).

rohoog avatar Oct 31 '20 22:10 rohoog

Without the array index overflow change, the optimization will expose the index overflow problem. The epd binary will cause a segmentation fault at the very end of the run.

rohoog avatar Oct 31 '20 22:10 rohoog