cancel
Showing results for 
Search instead for 
Did you mean: 

running TouchGFX_core from ITCM-RAM

Mmale.1
Associate II

hi everybody,happy new year.

I try to run TouchGFX project on STM32H750 Disco board

1.

in first level I run my project through QSPI,so i had frame lost and cant reach 60 frame per sec

2.

in second level i run my code from external sdram,i gain more performance but still i got lost frame

3.

in third level i run part of my code from internal flash and remained code from external flash,so there i got no frame lost.

but because there need for boot loader and other things to be placed in internal flash at later,so I have not space for my code(just i want test there execution code performance in third level )

4.

in level four I wanna to place touchGFX core in ITCMRAM as much as possible

(there is no enough space for all of touchgfx_core) but i got hard fault error

i attached excel file of compared items.

my project files is attached.

IAR 8.40.1 is my project IDE

my questions is :

1.why execute in place from QSPI is not like internal flash as ST company say?

2.can i move some part of TouchGFX core to ITCMRAM? how?what items should be concerned and what i should to do ?

3.do you have any or best idea for code execution place to got best performance ?

(need to concern i run it for 480*272 lcd but i need to run it for 480*800 pixel lcd at 30frame per sec at least.)

my *.icf file edited as follow :

/*###ICF### Section handled by ICF editor, don't touch! ****/

/*-Editor annotation file-*/

/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

/*-Specials-*/

define symbol __ICFEDIT_intvec_start__ = 0xD007F800;

export symbol __ICFEDIT_intvec_start__;

/*-Memory Regions-*/

define symbol __ICFEDIT_region_ROM_TGFX_start__  = 0xD007F800;

define symbol __ICFEDIT_region_ROM_TGFX_end__    = 0xD01FFFFF; /* xxxx Kbytes for TouchGFX demo */

/*-Internal RAM Memory Regions-*/

define symbol __ICFEDIT_region_ITCMRAM_start__   = 0x00000000;

define symbol __ICFEDIT_region_ITCMRAM_end__     = 0x0000FFFF; /* 64 Kbytes */

define symbol __ICFEDIT_region_DTCMRAM_start__   = 0x20000000;

define symbol __ICFEDIT_region_DTCMRAM_end__     = 0x2001FFFF; /* 128 Kbytes */

define symbol __ICFEDIT_region_RAM_start__       = 0x24000000;

define symbol __ICFEDIT_region_RAM_end__         = 0x2407FFFF; /* 512 Kbytes */

/*-External RAM Memory Regions-*/

define symbol __ICFEDIT_region_SDRAM_start__     = 0xD0000000; /*  8 Mbytes */

define symbol __ICFEDIT_region_SDRAM_end__       = 0xD07FFFFF;

/*-Quad-SPI Memory Regions-*/

define symbol __ICFEDIT_region_QSPI_TGFX_start__ = 0x90200000;

define symbol __ICFEDIT_region_QSPI_TGFX_end__   = 0x97FFFFFF; /* 126 Mbytes for TouchGFX demo */

/*-Sizes-*/

define symbol __ICFEDIT_size_cstack__ = 0x1000;

define symbol __ICFEDIT_size_heap__ = 0x1000;

/**** End of ICF editor section. ###ICF###*/

define memory mem with size = 4G;

define region ROM_TGFX_region  = mem:[from __ICFEDIT_region_ROM_TGFX_start__  to __ICFEDIT_region_ROM_TGFX_end__];

define region ITCMRAM_region   = mem:[from __ICFEDIT_region_ITCMRAM_start__   to __ICFEDIT_region_ITCMRAM_end__];

define region DTCMRAM_region   = mem:[from __ICFEDIT_region_DTCMRAM_start__   to __ICFEDIT_region_DTCMRAM_end__];

define region RAM_region       = mem:[from __ICFEDIT_region_RAM_start__       to __ICFEDIT_region_RAM_end__];

define region SDRAM_region     = mem:[from __ICFEDIT_region_SDRAM_start__     to __ICFEDIT_region_SDRAM_end__];

define region QSPI_TGFX_region = mem:[from __ICFEDIT_region_QSPI_TGFX_start__ to __ICFEDIT_region_QSPI_TGFX_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };

define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite, section LIB_CODE };

do not initialize { section .noinit, section TouchGFX_Framebuffer, section BmpCacheSection };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place at address mem:0x08000000 { section .Bootloader };

place in DTCMRAM_region    { };

place in RAM_region        { first readwrite, block CSTACK, block HEAP, last section sdio_heap };

place in SDRAM_region      { first section TouchGFX_Framebuffer, last section BmpCacheSection };

place in ROM_TGFX_region   { readonly };

place in QSPI_TGFX_region  { first section ExtFlashSection

                           , section TextFlashSection

                           , section FontFlashSection };

define block LIB_CODE with fixed order

{

 //readonly object      LCD16bpp.o

};

place in ITCMRAM_region { block LIB_CODE };

6 REPLIES 6
MM..1
Chief III

Maybe only i tip, check your code to use address 0 directly, this maybe corrupt your lib placed here...

thank you but can you plz explain more?

what is your mean?

For example interrupt table is copied to ITCM , or ...

i don't want IT run through ITCM RAM ,i just wanna to run TouchGFX_core.a from ITCMRAM and the other section of code from external SDRAM (even IT Table)

Is irelevant what you want or write in icf file, when in code you use *(0) = 5; or set ltdc.layer1addr=0; ...

First example overwrite your core and second read it maybe with unused layer and block access to it ...

Too im not IAR expert, but in other IDE code placing to RAM need first place to flash, then to RAM and copy operation must handle system loader or user code.

Compile your code , run and stop debug in main start, then compare bin object file for core with memory on address 0..x , and trace and find where is problem. But i mean cache ART for code in FLASH is full powered for run code and ITCM not improve this important.

For good graphics you need balance between framerate setup and amount of changed graphics between one frame.

V.H
Senior

I want to run some part of (touchgfx_core.lib) function in ITCM, such as function interrupt used.

ITCM only has 64KB, I cannot pull all function into ITCM.

Have you solved your problem?