Flash memory almost full

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

    • Flash memory almost full

      Hi,

      I am using emWin library for Graphic interface. Currently I have designed a screen with an image, 8 Icons and few numbers on the screen. I have a processor with 256KBytes of memory. When I compile the code, I see that my code occupies 90% of the program memory. I have checked the resource usage and the icons with screen should not be taking up so much memory. I commented the screen with just GUI_Init() and GUI_Delay() in the code and it occupies 16% of the memory.

      1. Can someone explain what could be taking up so much memory space and how it can be reduced?
      2. Will I need an external flash while using emWin to design more than two screens?
      3. Is there a way to make use of just the code that's being used/ have I setup something wrong on emWin that could be causing this?

      Appreciate all the help!

      Best regards,
      BMD
    • Hi,

      I guess you are referring to the intern ROM of your MCU. It shouldn't occupy that much of your memory.

      Where do you get the emWin library from (ST, NXP, Reneses, etc.)?

      Maybe I can reproduce it.


      bio_med wrote:

      Will I need an external flash while using emWin to design more than two screens?
      Definitely not for just two screens.


      bio_med wrote:

      Is there a way to make use of just the code that's being used/ have I setup something wrong on emWin that could be causing this?
      Typically the linker takes care of removing unused code.

      Can you send me your configuration files (GUIConf.c/.h and LCDConf.c/.h)?

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hi,

      The files look good so far.

      Unfortunately, I don't have access to Cypress Semiconductors evalboard. so I can't reproduce it.

      Typically emWin uses about 60-80 KB of ROM, depending on the features used. Are you sure that this is not releated to the images?

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Thank you for your response.
      I thought the same, that images could cause this memory issue. But when I took out the images and all the I had in the code was just GUI_Init() and GUI_Delay(), the memory consumption was 16% i.e 47 KB of ROM. Is this how much it usually takes or does this seem unusual?

      Regards,
      BMD
    • bio_med wrote:

      I thought the same, that images could cause this memory issue. But when I took out the images and all the I had in the code was just GUI_Init() and GUI_Delay(), the memory consumption was 16% i.e 47 KB of ROM. Is this how much it usually takes or does this seem unusual?
      Can anybody confirm this for me please?

      Thank you,
      BMD
    • Hi bio_med,

      this depends on any of the additional modules being active or not. If modules like the Window Manager, Widgets or Memory Devices are active, ~50KB of ROM usage are realistic.

      Best regards,

      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.