How to download and run program from RAM?

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

How to download and run program from RAM?

4,897 次查看
jameso
Contributor II

How can I run/debug my entire program in SDRAM instead of FLASH using MCUXpresso IDE v10.1.1?

标记 (2)
4 回复数

3,755 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Since you say you don't want to use flash, I presume this is for debug purposes only?  You didn't mention which processor you're using, but the main obstacle is most MCUs do not boot from SRAM. Therefore, the debugger has to establish a reset context to the application. There are example reset scripts in the Scripts folder of your installation you can reference. Add a suitable reset script to the launch configuration. Link your program to an RAM address, of course, and be certain the RAM is internal and available at reset. There are different methods to link your code to RAM. As one example, navigate to Projects -> C/C++ Build -> Settings -> MCU Linker -> Managed Linker Script and check the "Link application to RAM" checkbox. A second method is to use the Memory Configuration editor, and simply delete the flash region entry if one exists. I prefer the first method.

Thanks and regards,

MCUXpresso Support

3,755 次查看
jameso
Contributor II

Thank you for your response.

What about for an external RAM? My goal is to have the entire application on an external SDRAM and be able to debug it. What steps need to be taken in order to do so?


I am using the EA LPC1788 Evaluation Board and a Segger J-Link plus.

0 项奖励
回复

3,755 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

The short answer is you first need to ensure the external memory controller is setup so the debugger can access the SDRAM. MCUXpresso doesn't know how to do this for you. One approach would be to write a MCUXpresso connect script for this purpose. Connect scripts are also configured in the project launch configuration.

Thanks and regards,

MCUXpresso Support

0 项奖励
回复

3,754 次查看
talktrn
Contributor I

The MCUXpresso scripts that you referred to are found in 'install_dir'/ide/bin/Scripts.

1. Where is the documentation that describes the language of these reset and connect scripts?

2. There is a place in Debug Configurations to select a script for the J-Link Debugger, but where do the reset/connect scripts go?

3. Does MCUXpresso use any "default" scripts, and if so where are they?

4. Do these scripts apply to all debug adapters (i.e., Segger, PEMicro)?

0 项奖励
回复