Show animated GIF on WM Dialog

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

    • Show animated GIF on WM Dialog

      Hello, I'm using emWin on a STM32F7 custom hardware and I will like to show a small animated GIF inside a WM dialog (a sort of "Please wait" animation until a certain operation is completed) but, after some tests with either GUI_GIF_Draw plus MEMDEV functions and IMAGE_SetGIF, I didn't manage to show even a fixed frame of the GIF.
      I've assigned 3MB to the GUI and tried different GIF files (imported with Bin2C.exe).

      Could you please provide an example of this application? (I'm not using a simulator, just the custom board)

      Thank you very much!

      Regards,

      Mark
    • Thank you Schoenen for the quick reply and the attached example.

      I've used the same way of displaying the GIF file inside a WM_Dialog as the one used in the example but in a dedicated FreeRTOS thread.
      The result is that I get stucked right after the GUI_Delay() on a Usage Fault related to an Unaligned memory access.
      Any idea of the reasons I might get this fault?

      Thank you.

      Regards,
      Mark
    • Hi,

      Please try if it works when configuring the MPU of the STM32F7 before initializing emWin. Try the solutions from these threads:
      HardFalt when rendering PNG (STM32F746g disco)
      Memory usage



      I've used the same way of displaying the GIF file inside a WM_Dialog as the one used in the example but in a dedicated FreeRTOS thread.
      Do you mean one dedicated thread for emWin?

      Although, it is possible, try to avoid calling emWin from multiple threads.

      Regards,
      Sven
    • SEGGER - Schoenen wrote:

      Hi,

      Please try if it works when configuring the MPU of the STM32F7 before initializing emWin. Try the solutions from these threads:
      HardFalt when rendering PNG (STM32F746g disco)
      Memory usage



      I've used the same way of displaying the GIF file inside a WM_Dialog as the one used in the example but in a dedicated FreeRTOS thread.
      Do you mean one dedicated thread for emWin?
      Although, it is possible, try to avoid calling emWin from multiple threads.

      Regards,
      Sven

      Thank you again for the support Schoenen, it was a problem related to the MPU initialization which was not properly configured.

      Now it works fine! :)

      Best regards,
      Mark