cancel
Showing results for 
Search instead for 
Did you mean: 

how to load and read fontflashsection and textflashsection in qspi?

Zakba.1
Senior

I could successfully load and read images (ExtFlashFection)in QSPI but when it comes to font and text it doesn't work... I use stm32f767+qspi+sdram+keil environment... and you see the .sct file and my project here.

can anybody help me?? internal flash runs out of space because of fonts and text and I don't know what to do... thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

I dont use KEIL with TGFX, but primary try dont place TextFlashSection in QSPI.

Next debug your code, need switch mapped mode before tgfx init.

Using Non-Memory Mapped Flash for Font Data | TouchGFX Documentation

View solution in original post

9 REPLIES 9
Martin KJELDSEN
Chief III

Hi,

Just took a look at your map file and it seems there's lots of stuff in external flash

 ExtFlashSection                          0x9000071c   Section     3168  image_dasti.o(ExtFlashSection)
    ExtFlashSection                          0x9000137c   Section    33600  image_ent.o(ExtFlashSection)
    ExtFlashSection                          0x900096bc   Section    87120  image_felesh.o(ExtFlashSection)
    ExtFlashSection                          0x9001eb0c   Section    86680  image_felesh_left.o(ExtFlashSection)
    ExtFlashSection                          0x90033da4   Section    768000  image_gireh_1.o(ExtFlashSection)
    ExtFlashSection                          0x900ef5a4   Section    1534080  image_gireh_2.o(ExtFlashSection)
    ExtFlashSection                          0x90265e24   Section     1656  image_green_led_inout.o(ExtFlashSection)
    ExtFlashSection                          0x9026649c   Section     3712  image_header_sqr_heater_blue.o(ExtFlashSection)
    ExtFlashSection                          0x9026731c   Section     3472  image_header_sqr_heater_red.o(ExtFlashSection)
    ExtFlashSection                          0x902680ac   Section    313600  image_inout2.o(ExtFlashSection)
    ExtFlashSection                          0x902b49ac   Section     1836  image_nim_auto.o(ExtFlashSection)
    ExtFlashSection                          0x902b50d8   Section     1820  image_nimdasti.o(ExtFlashSection)
    ExtFlashSection                          0x902b57f4   Section    1534080  image_paran_badi.o(ExtFlashSection)
    ExtFlashSection                          0x9042c074   Section     1564  image_red_led_inout.o(ExtFlashSection)
    FontFlashSection                         0x9042c690   Section    143785  font_arial_22_4bpp_0.o(FontFlashSection)
    FontFlashSection                         0x9044f83c   Section     1559  font_arial_22_4bpp_1.o(FontFlashSection)
    FontFlashSection                         0x9044fe54   Section      349  font_arial_22_4bpp_20.o(FontFlashSection)
    FontFlashSection                         0x9044ffb4   Section    74229  font_arial_22_4bpp_3.o(FontFlashSection)
    FontFlashSection                         0x904621ac   Section    28433  font_arial_22_4bpp_31.o(FontFlashSection)
    FontFlashSection                         0x904690c0   Section    19744  font_arial_22_4bpp_4.o(FontFlashSection)
    FontFlashSection                         0x9046dde0   Section     3395  font_arial_22_4bpp_5.o(FontFlashSection)
    FontFlashSection                         0x9046eb24   Section       89  font_verdana_10_4bpp_0.o(FontFlashSection)
    FontFlashSection                         0x9046eb80   Section      810  font_verdana_15_4bpp_0.o(FontFlashSection)
    FontFlashSection                         0x9046eeac   Section     1564  font_verdana_20_4bpp_0.o(FontFlashSection)
    FontFlashSection                         0x9046f4c8   Section     4310  font_verdana_40_4bpp_0.o(FontFlashSection)
    FontFlashSection                         0x904705a0   Section    42056  table_arial_22_4bpp.o(FontFlashSection)
    FontFlashSection                         0x9047a9e8   Section       98  table_verdana_10_4bpp.o(FontFlashSection)
    FontFlashSection                         0x9047aa4c   Section      280  table_verdana_15_4bpp.o(FontFlashSection)
    FontFlashSection                         0x9047ab64   Section      322  table_verdana_20_4bpp.o(FontFlashSection)
    FontFlashSection                         0x9047aca8   Section      238  table_verdana_40_4bpp.o(FontFlashSection)
    TextFlashSection                         0x9047ad98   Section      556  languagegb.o(TextFlashSection)
    TextFlashSection                         0x9047afc4   Section     2130  texts.o(TextFlashSection)
    TextFlashSection                         0x9047b818   Section      278  typedtextdatabase.o(TextFlashSection)
    typedText_database_GB                    0x9047b818   Data         278  typedtextdatabase.o(TextFlashSection)

Martin KJELDSEN
Chief III

This is the .sct file re: qspi for the f769-disco tbs

LR_EROM1 0x90000000 0x4000000  {    ; load region size_region
  ER_EROM1 0x90000000 0x4000000  {  ; load address = execution address
   *.o (ExtFlashSection)
   *.o (TextFlashSection)
   *.o (FontFlashSection)
  }
}

Thank you sir for replying. but it still doesn't work. Before adding font and text to qspi everything is ok. but when I add them to the scatter file LCD shows just garbage...Is there any other thing I can do?

this the photo of LCD after programing...

MM..1
Chief II

I dont use KEIL with TGFX, but primary try dont place TextFlashSection in QSPI.

Next debug your code, need switch mapped mode before tgfx init.

Using Non-Memory Mapped Flash for Font Data | TouchGFX Documentation

Thank you so much...

Thank you sir. I deleted textflash section from scatter file and it worked...

Since you're using a memory-mapped external flash, know that texts are supposed to work. Removing texts (placing them in internal flash) is a quick fix sure, but you might want to investigate further why its not working.

if you call setLanguage() before QSPI is configured then you will end up with a hardfault. Can you share your call tree? When is QSPI configured? When is touchgfx initialized?

Zakba.1
Senior

yes sir. I want to place TextFlahSection in ext flash too. As you can see in the photo QSpi is initialized before Touchfgx in the config tree...