cancel
Showing results for 
Search instead for 
Did you mean: 

Where should I write the DTCM variable in CUBEIDE?

Ljunh.1
Associate II

​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.

1 REPLY 1

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
Up vote any posts that you find helpful, it shows what's working..