Increase m_text for M4 in OCRAM

I needed more code space for an M4 application on an iMX7D. I am currently running the application out of OCRAM.

I changed the MCIMX7D_M4_ocram.ld

  • from: m_text (RX) : ORIGIN = 0x00910000, LENGTH = 0x00010000
  • to: m_text (RX) : ORIGIN = 0x00908000, LENGTH = 0x00017FFF

This worked perfectly. However, I am concerned that I may have taken up space allocated to other functionality that is not obvious. I see that the imx7-colibri.dtsi actually has the following declaration;

  • &ocram {
    reg = 0x00901000 0xf000;

I don’t know where this is used or if it will turn into a problem later.

Any help to confirm my change is valid would be helpful.

Please check an answer on this topic - Starting m4 application from ocram imx7 - Technical Support - Toradex Community

@alex.tx Hello Alex, I have seen that answer before, but my question remains. The 60kB that is reserved but seems to be untouched is what I am worried about. How can I guarantee that it will not be used by Linux? Should I just reduce the reservation as follows to make sure?

&ocram { reg = 0x00901000 0x6FFF; };

I can’t add anything to that answer. That OCRAM region reservation was not introduced by Toradex.