How to download and run program from RAM?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to download and run program from RAM?

5,062件の閲覧回数
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,920件の閲覧回数
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,920件の閲覧回数
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,920件の閲覧回数
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,919件の閲覧回数
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 件の賞賛
返信