RT1052 怎么将代码搬运到SDRAM运行?

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

RT1052 怎么将代码搬运到SDRAM运行?

跳至解决方案
6,242 次查看
1914795885
Contributor II

  您好:

         RT1052外置了8MB的flash和32MB的SDRAM,在上电时,能否将代码搬运到SDRAM中运行?,该怎么做呢?搬运到SDRAM中运行,效率是否会提升呢?还有我有少量的传感器数据,需要掉电储存,代码搬运到SDRAM中运行后,8MB的flash是否可以存储传感器数据呢?

标签 (1)
0 项奖励
回复
1 解答
5,971 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi main i,

感谢你的回复。

假设你的工程函数代码很小的话,在定义函数时,前面添加_ramfunc 关键字,IDE会自动将函数拷贝到RAM中,具体你可以参考此贴的分享:http://www.keil.com/support/docs/3228.htm

但是如果工程函数巨大的话,可以专门写一个拷贝函数将目标函数从Flash拷贝到对应的RAM中运行,这种方式你可以参考下面这个帖子:https://community.arm.com/developer/tools-software/tools/f/keil-forum/31967/lpc1768-copy-function-co...

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

在原帖中查看解决方案

4 回复数
5,971 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi main i,

非常感谢使用NXP产品,很高兴为你提供技术支持!
1. 实现代码从Flash迁移到SDRAM中运行的操作步骤,请查阅对应IDE的用户手册。
2. 效率相比运行在Flash内,当然会有提高。
3. 可以存储回flash内。

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 项奖励
回复
5,971 次查看
1914795885
Contributor II

关于代码搬运方面,能不能提供一个例子,MDK或者IAR都可以

0 项奖励
回复
5,972 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi main i,

感谢你的回复。

假设你的工程函数代码很小的话,在定义函数时,前面添加_ramfunc 关键字,IDE会自动将函数拷贝到RAM中,具体你可以参考此贴的分享:http://www.keil.com/support/docs/3228.htm

但是如果工程函数巨大的话,可以专门写一个拷贝函数将目标函数从Flash拷贝到对应的RAM中运行,这种方式你可以参考下面这个帖子:https://community.arm.com/developer/tools-software/tools/f/keil-forum/31967/lpc1768-copy-function-co...

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

5,971 次查看
1914795885
Contributor II

非常感谢,我也找到了一个关于这方面的帖子  https://www.eefocus.com/constyu/blog/19-01/435767_5f1b0.html 

0 项奖励
回复