Skip to main content
Visitor II
May 28, 2025
Solved

How to use DTCM RAM?

  • May 28, 2025
  • 1 reply
  • 823 views

I'd like to use the DTCM ram in my code; how can I do ?

 

Thank you

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Describe the memory regions in your linker script or scatter file.

    Use compiler directives say attributes or pragmas to direct specific code, or buffers to use the memory.

    Code in specific source files, via object file, can be directed via linker scripts

    A for filling/preloading DTCM, for GNU/GCC you'd need to add initialization code in startup.s and staging via the linker script, in a similar manner to how statics are handled for RAM from FLASH

    1 reply

    Super User
    May 28, 2025
    carloVAuthor
    Visitor II
    May 28, 2025

    Thank you,

    I know that is very important to understand the MPU architecture, but what I need to know is:

    in what way can I insert in my project some lines of code that  make that type of memory (DTCM, ITCM,...) usage available  to my project.

     

     

    Super User
    May 28, 2025

    You would do this in the Linker script (the .ld file, for CubeIDE) rather than in the code.

    The thread @TDK linked says, "See also X-CUBE-PERF-H7 (related to the said application note) how linker files are implemented" ...