cancel
Showing results for 
Search instead for 
Did you mean: 

Why external FLASH is used even there is a space on the internal

mcagriaksoy
Associate III

Hello,

I am testing a demo of my TSD TSS012004A-AD board.
It has 36KB internal RAm and 256KB internal FLASH.
My configuration on touchGFX like below:

mcagriaksoy_0-1771409127129.png

And my linker result is like below:

mcagriaksoy_1-1771409160488.png

As you can see there is still %55 empty on my internal FLASH and very little SPI_FLASH is used, I would like to use only internal memory. Why this 13388B is not used on FLASH, even I force to use internal flash section on touchGFX settings.

 

Thank you,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Just edit this part of the linker file (STM32C091XX_FLASH.ld):

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

to:

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

Result:

unsigned_char_array_1-1771416618565.png

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

View solution in original post

6 REPLIES 6
JohanAstrup
ST Employee

Hello @mcagriaksoy.

256 KB is not a large amount of flash memory for graphics applications. Therefore, the default configuration places all images and fonts in external flash memory.

However, changing either the default image configuration or the image-specific configuration in the image tab should work, and it works when I test it.
If you change the default image configuration, ensure that Default is selected for the assets you want to use this configuration for in the image tab. It should e.g. look like this:

JohanAstrup_1-1771410723690.png

If it still does not work, you can share your project. Then I will review it.

Best regards,
Johan

Hello @JohanAstrup,

Thanks for the quick response, yes, I know 256KB is not a lot, but 128KB is still empty, so I would like to use that space instead.

On the tab of images, I have already checked all selected default, and even I select the "IntFlashSection" it is same.

mcagriaksoy_0-1771411215724.png

I realized that that, the data on SPI_FLASH is the font. There is no option on touchGFX or somehow I cannot see that, I cannot force to put the font data on internal memory,
I think only data on external FLASH is the font, I`ve changed my font size to be sure, and realized the used memory is decreased..

mcagriaksoy_1-1771411295497.png

So, what do you think, what should I follow next? I attached my project.
By the way, there is a demo project on touchgfx (Knob Lite), uses internal memory only even that demo has more images, allocated spaces than me..

 

Thank you,

 

Just edit this part of the linker file (STM32C091XX_FLASH.ld):

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

to:

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

Result:

unsigned_char_array_1-1771416618565.png

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
mcagriaksoy
Associate III

Hi @unsigned_char_array 

Thanks for the fix, it resolved the issue, now there is no data on the SPI_FLASH as I requested, but this time, I cannot print any text on the display regardless of the font, size, type etc.
Do you know is there any root cause might cause font cannot be displayed?

 

Edit: Under the text configuration config window, the "Mapped storage format option" must be selected, so with this selection resolved my issue.

 

I don't know. But it could be something was cached incorrectly. Delete all TouchGFX generated files and generate them again.
Does it work in the simulator?

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

@mcagriaksoy wrote:

Thanks for the fix, it resolved the issue, now there is no data on the SPI_FLASH as I requested,


Then please mark the solution on the post which provided the answer - not this one!

 

@mcagriaksoy wrote:

but this time, I cannot print any text on the display regardless of the font, size, type etc.
Do you know is there any root cause might cause font cannot be displayed?


That's a new question - please start a new thread for that.

Provide a link here so that people can find it.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.