程序无法直接在SDRAM中debug

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

程序无法直接在SDRAM中debug

Jump to solution
3,109 Views
lyjian
Contributor I

你好,

    1、我目前正在使用MCUXpressoIDE和rt1050的demo板测试,发现程序无法直接在SDRAM上debug。我使用dcd配置SDRAM,在ram上跑时是可以正常读写SDRAM的。

    我在“C/C++ Build-Settings-MCU Linker-Managed Linker Script”中勾选“Link application to RAM”,直接在ram上debug是可以成功的,但改为勾选“Plain load image”,选择BOARD_SDRAM,debug时报错,提示:
15: Target error from Read Memory
Debug port inaccessible after access at location 0x800002F0
Debug port inaccessible after access at location 0x80000500
Debug port inaccessible after access at location 0x80000504
Debug port inaccessible after access at location 0x80000440
Debug port inaccessible after access at location 0x80000460
Debugging context: evkbimxrt1050_1662 LinkServer Debug

请问是什么问题?

2、由于我们项目使用的SDRAM型号和demo板上的不一样,请问有什么方法或工具可以生成相应的dcd文件?

Labels (1)
0 Kudos
1 Solution
2,770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi l yjian,

感谢回复。

跟MCUXpresso 部门的同事确认,MCUXpreeso支持在debug时初始化SDRAM,具体方法步骤回复不太好介绍清楚,所以请参考原贴。

https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2017/12/07/overview-of-using-the-...


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

8 Replies
2,770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi l yjian,

非常感谢使用NXP产品,很高兴为你提供技术支持!
Q1) 对你说的‘’程序无法直接在SDRAM上debug‘’,你是指指定函数在SDRAM运行还是整个代码都运行在SDRAM,然后IDE提示错误?
Q2) 目前这方面还没有专门的文档介绍,你可以参考此贴来了解一下。
https://community.nxp.com/thread/502141
Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,770 Views
lyjian
Contributor I

你好,

1、我是整个代码都运行在SDRAM,我项目的需求是代码保存在LPSPI Flash,上电时在SDRAM运行整个代码。现在为了调试方便,希望可以在IDE直接下载代码进SDRAM进行调试DEBUG;就像在直接在ram上debug一样。

2、好的,我看看,谢谢。

0 Kudos
2,770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi l yjian,

感谢回复。

想让代码运行在SDRAM里,之前需要连接SDRAM的SEMC模块可以被正确地初始化,针对你的问题,是因为MCUXpreeso无法在调试之前就把SDRAM初始化好,再把整个代码放在SDRAM里运行。

Hope this is clear.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,770 Views
lyjian
Contributor I

你好,那有什么方法可以实现在SDRAM调试代码?

0 Kudos
2,770 Views
jeremyzhou
NXP Employee
NXP Employee

Hi l yjian,

感谢回复。

Q1) 那有什么方法可以实现在SDRAM调试代码?

-- 配置DCD可以让MCU在启动时可以初始化SDRAM, 还有配置IVT可以将存储在QSPI的程序整体拷贝在SDRAM中运行,这是我想到的实现在SDRAM调试代码的办法,但是个人觉得没有太大意义如果你板子已经有QSPI的话,直接调试运行在QSPI的代码与调试搬移到SDRAM运行的代码,本质上没什么差别。


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,770 Views
lyjian
Contributor I

你好,

我们实际的板子上是没有QSPI Flash的,只有LPSPI Flash:代码保存在LPSPI Flash,上电后在SDRAM运行代码。我的代码也是通过DCD和IVT等进行配置,正常启动运行是没有问题的,关键是现在不能debug?

0 Kudos
2,771 Views
jeremyzhou
NXP Employee
NXP Employee

Hi l yjian,

感谢回复。

跟MCUXpresso 部门的同事确认,MCUXpreeso支持在debug时初始化SDRAM,具体方法步骤回复不太好介绍清楚,所以请参考原贴。

https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2017/12/07/overview-of-using-the-...


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

2,770 Views
lyjian
Contributor I

你好,问题已解决,非常感谢您的回答,谢谢。

0 Kudos