Skip to main content
Ljunh.1
Associate II
November 16, 2020
Question

Where should I write the DTCM variable in CUBEIDE?

  • November 16, 2020
  • 1 reply
  • 1384 views

​I have a problem with the sdcard, so I was looking for the community and they said I can change the DMA's DTCM variable, so I'm trying to insert the code, but I'm wondering how to change the IAR code in CUBEIDE and where to put it.

This is the code.

0693W000005BQxGQAW.jpg 

And I think we can put it in RAM.id, so I wrote it down first, but I don't know if it's right.

0693W000005BFi0QAG.jpg 

I don't know much because I just started STM.

But I really want to solve the problem of Sdcard!

Thank you.

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
November 16, 2020

No, you can't just stuff that in like that.

You'd want to add a DTCMRAM section, like the RAM one, and move the RAM one to 0x20020000 and shrink it's size

You'd then create SECTIONS for the DTCMRAM, and direct content in there.

If it is initialized, rather than NOLOAD, then you'd need to add code to startup.s to copy content.

Probably want to use __attribute__ on the C side to direct or name section to use.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..