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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
4,096 次查看
chandiniindavar
Contributor IV

Hi

I have modified  "MCIMX7D_M4_ddr.ld " as follow

MEMORY
{
      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

Chandini

标签 (5)
0 项奖励
回复
1 解答
3,395 次查看
ryanschaefer
Contributor IV

Hi Chandini,

 

Please refer to my similar question here:

https://community.nxp.com/message/921361 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
3,396 次查看
ryanschaefer
Contributor IV

Hi Chandini,

 

Please refer to my similar question here:

https://community.nxp.com/message/921361 

0 项奖励
回复
3,395 次查看
chandiniindavar
Contributor IV

Thanks Ryan and Carlos .

0 项奖励
回复
3,395 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Chandini,

IMX6SX provides also Cortex-M4 as IMX7D does. The following document will be useful:

http://www.nxp.com/docs/en/application-note/AN5127.pdf 

For further details please provide information details about how are you developing M4 application. What compiler are you using, which IDE, is it based on an example application?


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复