PanelDue firmware size



  • Since firmware size for large screens (5" or 7") is already very close to MCU flash size are there any plans to optimize it? It looks like icons and font take more than 70kb of the flash. Storing icons using some kind of compression may help, something very simple, RLE or similar. If I try to implement it are you interested to merge?


  • administrators

    Yes, it would be very useful to save some flash memory. The problem with using RLL or similar compression is that the order in which the font entries are accessed depends on the orientation of the display. This is to avoid having to write the pixel address to the display for every pixel, which would slow down writes. Likewise with the icons.

    However, the icons could be compressed by using a palette. 16 colours should be enough for any icon, which would reduce the storage space from 16 bits/pixel to 4 bits/pixel, plus 32 bytes per palette. Several icons could share a palette, for example all the home icons. Another advantage of this scheme is that we could use different palettes for the light and dark themes.

    I was planning to implement this, but due to other work I don't know when I will have time. So you are more than welcome to implement it!



  • Looks like using palette is great idea, I'll try to implement it and post the results.



  • So build for 5" panel is only 94kb now, much more room left for my evil plans!

    11.06.2017 01:58 96 832 PanelDueFirmware.bin
    11.06.2017 01:55 253 532 PanelDueFirmware.elf
    11.06.2017 01:55 272 421 PanelDueFirmware.hex
    11.06.2017 01:55 257 344 PanelDueFirmware.map



  • BTW switching to the dark palette is not implemented yet.

    Actually I'm more interested in adding non-latin characters to the fonts to add more locales…


  • administrators

    Many thanks for implementing this! I have merged it in to the master source along with some other changes I was developing. I made further changes to select the light or dark palette according to the colour scheme chosen, however I haven't changed the colours in the dark palette yet.



  • I needed this more than you 🙂

    btw: I didn't check it with small screens, but it seems to be fine with 5" panel (width 800px)


  • administrators

    I have tested it on a 4.3" screen.



  • How about 7inch screens?


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.