Bitmaps saved in SDRAM

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Bitmaps saved in SDRAM

      The application code is in the internal Flash memory of MCU (LPC1785). I need to save constant bitmap images in the external SPI Flash memory. At startup I copy the images from SPI Flash to SDRAM, so the access is much more faster. I have plenty of SDRAM available.

      All works well, but the debug workflow is very slow. I'm not able to start the debug session that writes at the same time internal and external SPI Flash (or internal Flash and SDRAM). So I need to write to SPI Flash memory by the bootloader that is time consuming.
      It should be ok if the binary image of SPI Flash changes only if bitmaps are changed, however this is not the case.

      GUI_BITMAP structure contains some pointers to emWin functions that are placed by the linker at different places in internal Flash memory when the code is changed, even if no changes to the bitmaps are made.

      What do you suggest? One solution could be to use BMP file directly and not C array, but I don't like it because the images are known at compile time.
    • I found a solution. I changed linker script to put emWin constants used in GUI_BITMAP structures (GUI_BitmapMethods*) in a fixed location. In this way, even if I change the application code, GUI_BitmapMethods* are always at the same address and GUI_BITMAP structures don't change.

      The same thing I made for GUI_FONT structures used in my code, because I'd like to save fonts in SPI Flash too.

      It seems this works, but I suspect there is a better approach to my needs.