AnsweredAssumed Answered

How to link code to DDR (start address 0x80000000) on Cortex M4 side in IMX7D

Question asked by chandini indavara basavaraju on Aug 14, 2017
Latest reply on Sep 4, 2017 by chandini indavara basavaraju



I have modified  "MCIMX7D_M4_ddr.ld " as follow


      m_interrupts (RX) : ORIGIN = 0x80000000, LENGTH = 0x00000240
      m_text (RX) : ORIGIN = 0x80000240, LENGTH = 0x0001FFFF 
      m_data (RW) : ORIGIN = 0x20210000, LENGTH = 0x00010000 

there is no error when I compile the code, but the process can not start up when I load the binary file to 0x80000000 on uboot. I load file as follow: 


tftp 0x80000000 example.bin;

dcache flush;

bootaux 0x80000000


M4 core starts up and i can see my starting printf  in M4 terminal


i did change imx7d-sdb.dts and imx7d-sdb-m4.dts 


Changed from 0x80000000  to 0x80100000  in both files

in imx7d-sdb.dts

memory {
reg = <0x80100000 0x80000000>;


in imx7d-sdb-m4.dts:

memory {
linux,usable-memory = <0x80100000 0x1ff00000>, 
<0xa0000000 0x1ff00000>;


But linux hangs here

** Unable to read file boot.scr **
reading zImage
6619128 bytes read in 326 ms (19.4 MiB/s)
Booting from mmc ...
reading imx7d-sdb-m4.dtb
46439 bytes read in 35 ms (1.3 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x64fff8 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300e566

Starting kernel ...


Could anyone please what changes i have to do to USE starting of DDR for only M4 ? any disable linux access to that memory ? 


Thank you in advance