GUIX_resources.c into SDRAM section

Is there a way to allocate all the UI variables that is automatically generated from GUIX to store them into SDRAM section instead of using the main S7G2 RAM?

 

BSP_PLACE_IN_SECTION_V2(".sdram"); this can be used manually inside the GUIX_resources.C but that file is very large (appx. 150K lines) so the e2 studio takes a long time opening that file and editing that file is not the right the way to do? as it keeps auto generating as you change the UI on GUIX.

but is there a way on GUIX or e2 studio to automatically allocate any GUIX variables into SDRAM section ?

 

Thanks,

Sam

SSP 1.6.3

GUIX 5.4.1.1

  • Hi Sam,

    Please see the following thread: 

    You can use similar method to move stuff to SDRAM, however there are no variables in GUIX_resources.c, only constant data. All of the variables are placed in GUIX_specifications.c and you will also need to filter this by section since some data is initialized or constant (in the example above, (*) should be replaced by something like (.bss*) ).

    If you'd like to move initialized and constant data, then you can also do so, but you will also need to write a loader routine to initialized this segment from data in flash. Here's an example showing how to move all symbols starting with FONT_THEME_1_DIGITS (i.e. my font data) to custom section allocated in RAM (and loaded from FLASH):

    The custom loader routine can be placed in R_BSP_WarmStart:

    Regards

  • In reply to Renesas Karol:

    Hi Karol,
    I added after the .bss section and cleaned the project and rebuild it but the Memory usage still shows the same bytes for SDRAM as before. Doesn't seem to have any effect. I must be missing something?

    .try1 :
    {
    . = ALIGN(4);
    *(.bss*)
    . = ALIGN(4);
    } > SDRAM

    Thanks,
    Sam
  • In reply to Sam:

    Hello Sam,

    The linker script part I've shown should be defined before the standard section for that content. For example, if you're moving something that by default goes to .bss, you'll need to define this before .bss in the linker script.

    Regards
  • In reply to Renesas Karol:

    I tried several things, defined it before the .bss section. Compiled the code..still same results.

     

     

  • In reply to Sam:

    Hi Sam,

    >I tried several things, defined it before the .bss section. Compiled the code..still same results.
    Have you cleaned your project after changing linker script file?
    It didn't effect without cleaning.

    And, if you want allocate only guiapp_specifications.c to sdram, you made a false step.
    Try the following.
    It worked for me.

    .try1 :
    {
    . = ALIGN(4);
    *src/gui/*specifications.o(.bss*)
    *src/gui/*specifications.o(COMMON)
    . = ALIGN(4);
    } > SDRAM

    .bss :
    {
    . = ALIGN(4);
    __bss_start__ = .;
    *(.bss*)
    *(COMMON)
    . = ALIGN(4);
    __bss_end__ = .;
    } > RAM
  • In reply to tenballs:

    After trying with specific lines, it is allocating as expected now.
    *src/gui/*specifications.o(.bss*)
    *src/gui/*specifications.o(COMMON)


    Thanks,
    Sam