u8glib 1.11 reduce the size of the library

Hi Oliver: :slight_smile:

I compiled my sketch and it is 32.852 bytes (de un máximo de 32.256 bytes), and I have not finished writing code. I have a Arduino UNO and i have a problem with memory. I use the device DOGM128 of your library:

U8GLIB_DOGM128 scru8g(PIN_D_SCR_SDI, PIN_D_SCR_SCL, PIN_D_SCR_CS, PIN_D_SCR_A0, PIN_D_SCR_RES);    //Variable para la pantalla

In the compilation windows i see that there are too many files of devices that i not use in my sketch. For example:

C:\DOCUME~1\AGGUCQ~1\CONFIG~1\Temp\build8223436570558583332.tmp\U8glib\utility\u8g_dev_ssd1306_128x64.c.o C:\DOCUME~1\AGGUCQ~1\CONFIG~1\Temp\build8223436570558583332.tmp\U8glib\utility\u8g_dev_lc7981_160x80.c.o C:\DOCUME~1\AGGUCQ~1\CONFIG~1\Temp\build8223436570558583332.tmp\U8glib\utility\u8g_dev_ssd1325_nhd27oled_gr_new.c.o
etc, etc

How can I do for eliminate those files of compilation?. It's possible?

Thanks again.

Hi
The code of these files will not be part of the final hex file. Usually there are other reasons for the size of your project.

  • large fonts
  • other libs
    Can you provide a list of u8glib fonts? Maybe this can be optimized.

Oliver

Hi, Oliver:

I reduced the size of file "fonts", I've keep only those i use. And thats ok.

so i'm looking in the other libs that i use. :slight_smile:

Thanks.

Also note that fonts are available with different number of glyphs (full set or reduced set of characters). In those cases where you do not need character codes higher than 127, you could use the reduced font (postfix is 'r').

Oliver