cancel
Showing results for 
Search instead for 
Did you mean: 

Flash and ram overflowaded for no reason (using CubeMx and TouchGFX)

I_ve_got_a_problem
Associate III

Hi I'm trying to create a project for my H735G DK manually because I'm trying to learn about how its done, but each time i finish configuring the .ioc file i get this error

I_ve_got_a_problem_0-1712824558059.png

I will pass my .ioc file if anyone wants to check it but its been copied from the .ioc file that touchGFX creates for this MCU, because my goal is to learn about how the link between touchGFX and a cubeMX project work.

The real problem is that, even though the project that touchGFX creates builds, just for testing I copied the .ioc file to create a new project (not manually, but with cubeMX feature shown below)

I_ve_got_a_problem_1-1712824781626.png

But I am still getting the overflowed error, and this should be exactly the same project as the original .ioc creates right? So why does just one build. Can anyone tell me what is happening, tbh I'm freaking out a little bit.

 

Ty in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions

I'm not a TouchGFX expert but to my knowledge there is no possibilty to edit this in the CubeMx GUI. You need to do it yourself in the linker file.

Example from F769 example:

 

MEMORY
{
  RAM    (xrw)     : ORIGIN = 0x20000000, LENGTH = 512K
  FLASH    (rx)    : ORIGIN = 0x08000000, LENGTH = 2048K
  QUADSPI (r)      : ORIGIN = 0x90000000, LENGTH = 64M
  SDRAM   (xrw)    : ORIGIN = 0xC0000000, LENGTH = 16314K
}

  ExtFlashSection :
	{
		*(ExtFlashSection ExtFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI

  FontFlashSection :
	{
		*(FontFlashSection FontFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI

  TextFlashSection :
	{
		*(TextFlashSection TextFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI
	
  SDRAMSection :
  { 
    *(TouchGFX_Framebuffer TouchGFX_Framebuffer.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);     
  } >SDRAM

 

So create a project with a predefined project and inspire from its linker file.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
SofLit
ST Employee

Hello,

Seems the touchgfx stuff are not relocated to external memories:

For frame buffer needs to be relocated to the SDRAM and the images to be located to the octospi in the case of your board.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hi thanks for the quick response,

But how should i be fixing this? 
I'm sorry if I'm being naive but its the first time I try to create a project in CubeMX for touchgfx.

Regards

Hello,

If I understand well, you're a newbie with TouchGFX. So I suggest you to start with a predefined board from TouchGFX designer as you are using H735G DK board. Starting from CubeMx is a bit complex and needs a knowledge to configure all the needed stuff CTOSPI interface, SDRAM, Framebuffer, LCD configuration etc ..:

SofLit_0-1712829292080.png

SofLit_1-1712829339191.png

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
I_ve_got_a_problem
Associate III

I've been working with touchGFX for a a month, but now I'm transitioning to creating the projects in CubeMX cause we want to end up creating a custom board for our project.

So I need to create this project in cubeMX, i have seen that the external memories (both ram and flash) are not declared in my STM32H735IGKX_FLASH.id file, which is causing the problem, as you first said in the first reply. But how is this possible? I don't find any configuration for this file in the ioc file.

I'm not a TouchGFX expert but to my knowledge there is no possibilty to edit this in the CubeMx GUI. You need to do it yourself in the linker file.

Example from F769 example:

 

MEMORY
{
  RAM    (xrw)     : ORIGIN = 0x20000000, LENGTH = 512K
  FLASH    (rx)    : ORIGIN = 0x08000000, LENGTH = 2048K
  QUADSPI (r)      : ORIGIN = 0x90000000, LENGTH = 64M
  SDRAM   (xrw)    : ORIGIN = 0xC0000000, LENGTH = 16314K
}

  ExtFlashSection :
	{
		*(ExtFlashSection ExtFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI

  FontFlashSection :
	{
		*(FontFlashSection FontFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI

  TextFlashSection :
	{
		*(TextFlashSection TextFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI
	
  SDRAMSection :
  { 
    *(TouchGFX_Framebuffer TouchGFX_Framebuffer.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);     
  } >SDRAM

 

So create a project with a predefined project and inspire from its linker file.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

+

To relocate the TouchGFX assets in external Flash memory:

SofLit_1-1712831754712.png

To set the SDRAM address for TouchGFX:

SofLit_0-1712831703949.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I'll give it a try thx!