Strange problem with STemWin Library

  • Hello everyone
    I'm working on STemWin532 library on STM32F103ZET6 bord in STM32CudeIDE. I could successfully configured LCD interface (The Controller is HX8325B and GUI runs on internal RAM) and insert some text on the screen (image 1)

    But when i use external SRAM as GUI memory result is very strange and interesting :). The text is driven out of the screen. The picture 2 shows the situation.

    While the code is the same code that works correctly in the internal RAM of MCU. The only command that i changed is the following variable definition for GUI memory allocation:

    C: GUIConf.c
    #include "GUI.h"
    #define GUI_NUMBYTES       1024*50
    U32 static aMemory[GUI_NUMBYTES/4];   // This is for internal RAM
    U32 static aMemory[GUI_NUMBYTES/4]__attribute__((section(".GUI_0x68000000")));  // This is for extenal SRAM
    void GUI_X_Config(void) {
      GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
    }


    The section .GUI_0x68000000 is defined within linker command file as follows:


    Build Analyzer output of CudeIDE shows the memory usage as image 3.

    There is no hard fault in execution procedure and while(1) loop is executing as normal:. (image 4)

    Any help will highly appreciated.
    Best Regards
    H.Boosa

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!