2023-04-04 02:04 AM
Hi,
I'm working on a project where I should display some parameters on display. The display resolution is 800 x 480. I followed some tutorials to how to set touchGFX on MXCube and then imported on Cube Ide the project. The problem is that when I compile the project it keeps me saying that the both RAM and Flash overflows, as you can see in listing below:
c:\st\stm32cubeide_1.12.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: test1.elf section `TouchGFX_Framebuffer' will not fit in region `RAM'
c:\st\stm32cubeide_1.12.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: test1.elf section `TouchGFX_Framebuffer' will not fit in region `FLASH'
c:\st\stm32cubeide_1.12.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: region `RAM' overflowed by 447656 bytes
c:\st\stm32cubeide_1.12.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: region `FLASH' overflowed by 595640 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:90: test1.elf] Error 1
I set the SDRAM and DMA2D, but is not working. I don't plan to use freertos.
Here are some screenshot of the settings of the project:
The MCU that I'm using is STM32F746ZG.
The display that I'm using is the MIKROE-3620.
What can I do to resolve the overflowing problem?
2023-04-04 10:38 AM
Hello
Set the Buffer location to 'By address' insted of 'By allocation'. And then set address where you want to place the frambuffer to the Start address (typically SDRAM1 starts from 0xC0000000).
Maybe this touchGFX documentation is worth reading: Display with framebuffer in external RAM
Also other 'Board bring up' chapters might be helpful.
2023-04-04 12:05 PM
The error message you are seeing indicates that your TouchGFX project is using more RAM and Flash memory than your STM32F746ZG microcontroller has available. To resolve this issue, you can try the following:
In your specific case, since you have already tried to set up the SDRAM and DMA2D, but it did not work, I would suggest that you consider reducing the display resolution and number of colors used in your project, and using compressed images and fonts to reduce the memory usage. Additionally, you can try optimizing your code to further reduce its memory usage.
I hope it would be helpful:smiling_face_with_smiling_eyes:
2023-04-04 12:09 PM
Thanks a lot. It has definetly helped to set the buffer location "by address". Now when I compile, it does show no more errors.
I already read the TouchGFX docuentation and followed their step to set up SDRAM and DMA2D, but I was stuck at the overflowing problem.
2023-04-04 12:29 PM
When I encounter the overflow problem the first that came in mind was to lower the resolution, but I needed to lower up to 300x300 from 800x480. It was such a pity to ave such a great of resolution loss...
So then I tried to increase the RAM and Flash.
By the way, thanks for te advice to use compressed image and font, but how can I set this features. Is it done directly from TouchGFX software? Is there any documentation?
Regarding the number of color, right now I chose RGB565. Should I chose instead RGB888, ARGB1555 or ARGB4444. It is not clea the difference between the color formats... Any help?
2023-04-04 12:31 PM
When I encounter the overflow problem the first that came in mind was to lower the resolution, but I needed to lower up to 300x300 from 800x480. It was such a pity to ave such a great of resolution loss...
So then I tried to increase the RAM and Flash.
By the way, thanks for te advice to use compressed image and font, but how can I set this features. Is it done directly from TouchGFX software? Is there any documentation?
Regarding the number of color, right now I chose RGB565. Should I chose instead RGB888, ARGB1555 or ARGB4444. It is not clea the difference between the color formats... Any help?
2023-04-06 06:58 AM
MIKROE ??? Have you real SDRAM chips on your board. SDRAM isnt somthing to turn on...