Re: LTO linker option
Posted: Thu Apr 01, 2021 6:06 pm
i think there are stm32 soc that offers like 1 MB flash, it cost a similar premium for that benefit.
for that convenience it is likely worth it depends on your use case, but you could do away messing with spi or any 'extra' peripherals, simply build the whole lot data and all maybe even add images and bundle it in there 1 MB that is, whatever you can fit .
then there are interesting techniques like data compression
https://rosettacode.org/wiki/Huffman_coding
https://www.cprogramming.com/tutorial/c ... ffman.html
my guess is it'd work rather well for text.
but generally it seem some codes can pack quite a bit in a little flash
this lcd library along with its graphics test sketch + usb-serial and stm core takes about 40KB flash.
not the most optimized (-Os is specified, but maybe it can be improved, i'm using a makefile, but if you want to go the distance, perhaps it is possible to play with the compile flags say in boards.txt or platform.txt, these are all 'beyond the norm', they do not necessary make a difference for size at least) and i used an older compiler (which seemed to make fatter binaries)
https://github.com/ag88/Adafruit_ILI9341_SPI_stm32duino
within there it bundle Adafruit GFX graphics library as well as a font with it
https://learn.adafruit.com/adafruit-gfx ... y/overview
no LTO is used in the built, it runs rather well despite its rather 'fat' size.
as long as the app can fit in that flash, fat looking apps may still run.
that said, actually one of the biggest constraint is sram, not just flash, running memory hungry apps will set you against out of memory challenges
if it is just (storing) data, i've successfully used 16 GB sdcards, well that kinds of breaks every storage 'barrier' one can think of.
for that convenience it is likely worth it depends on your use case, but you could do away messing with spi or any 'extra' peripherals, simply build the whole lot data and all maybe even add images and bundle it in there 1 MB that is, whatever you can fit .
then there are interesting techniques like data compression
https://rosettacode.org/wiki/Huffman_coding
https://www.cprogramming.com/tutorial/c ... ffman.html
my guess is it'd work rather well for text.
but generally it seem some codes can pack quite a bit in a little flash
this lcd library along with its graphics test sketch + usb-serial and stm core takes about 40KB flash.
not the most optimized (-Os is specified, but maybe it can be improved, i'm using a makefile, but if you want to go the distance, perhaps it is possible to play with the compile flags say in boards.txt or platform.txt, these are all 'beyond the norm', they do not necessary make a difference for size at least) and i used an older compiler (which seemed to make fatter binaries)
https://github.com/ag88/Adafruit_ILI9341_SPI_stm32duino
within there it bundle Adafruit GFX graphics library as well as a font with it
https://learn.adafruit.com/adafruit-gfx ... y/overview
no LTO is used in the built, it runs rather well despite its rather 'fat' size.
as long as the app can fit in that flash, fat looking apps may still run.
that said, actually one of the biggest constraint is sram, not just flash, running memory hungry apps will set you against out of memory challenges
if it is just (storing) data, i've successfully used 16 GB sdcards, well that kinds of breaks every storage 'barrier' one can think of.