cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce code size for bootloader

RLarr.1
Associate II

We currently have a bootloader we have been using in our products. However it was created with emWin and we are transitioning everything to TouchGFX. The current boot loader fits in code space of 0xC000 and includes a few text updates to the 480x272 TFT display during programming updates. Using TouchGFX with nothing more than a few text lines to the display puts the code size to about twice what I have available. If I removed TouchGFX resource from CubeMx I end up with code that is about 6k under the 0xC000 size.

Unless I am missing something I may have only three choices:

  1. Return to the emWin for the bootloader.
  2. Find a reduction in required resources for TouchGFX framwork
  3. Attempt to write directly to the framebuffer and set up the hardware manually removing the TouchGFX framework.

Any ideas or articles on reducing the footprint for TouchGFX would be greatly appreciated. It looks like I need something that fits into about 6k of code space.

Thanks

3 REPLIES 3

>>Attempt to write directly to the framebuffer and set up the hardware manually removing the TouchGFX framework.

I see this as the least complicated approach.

Writing text from simple bitmap font tables, and painting same size bitmaps, in the scale of things, not hard stuff.

Some of the BSP examples do text, line and circle drawing without any extensive library code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
RLarr.1
Associate II

Thanks for the comment. It was indeed helpful. I now have what I needed using one of the BSP examples,

Piranha
Chief II

Tossing out the Newlib printf() functions with their dependencies will also save several KB of FLASH and almost 2 KB of RAM.