Debug in SDRAM

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

Debug in SDRAM

2,822件の閲覧回数
biafra
Senior Contributor I

Hi everyone,

I posted another question about loading an application to debug in SDRAM in the postDebug in SDRAM using KDS toolchain, referred to summarize the basic steps.

I was forced to switch to IAR toolchain because KDS doesn't allow to load the application code in SDRAM. I'm working on a custom board based on K65FX1M0M18 using J-Link or Multilink Universal debugger.

In the board there are:

  • K65FX1M0M18
  • External SDRAM (4M x 32)
  • External flash (2M x 16),

Now I'm considering to switch to MCUXpresso toolchain, but my doubt is the same: does MCUXpresso toolchain allow to load the application code in SDRAM? If so, how can it be done?

Many thanks,

Biafra

4 返答(返信)

2,207件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

You'll basically need to write and then a script that pokes the appropriate registers to set the SDRAM up before your debug session attempts to download the code into the RAM.

If you were using a LinkServer connection (such as LPC-Link2 / CMSIS-DAP), then this has the ability to run scripts as part of the debug connection setup. But more generically, you could probably also do this using a gdb init script too.

Regards,

MCUXpresso IDE Support

2,207件の閲覧回数
biafra
Senior Contributor I

Many thanks for your answer.

I can use PEmicro Multilink Universal debugger or JLink debugger, so I have to use a gdb init script, right?

Which is the syntax to write the script and how can I specify to use it?

Many thanks

Biafra

2,207件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Francesco Bianchini

In my understanding you have no problems to load your code to the external SDRAM, you have problems to debug it, am I correct?

If so, you have to tell the debugger which file to point when debugging, in the case of using a bootloader then you can debug both bootloader and application, please check the following post:

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

Here you can also find the link to a community doc where it is explained how to do this in KDS.

Hope it helps

Best Regards

Jorge Alcala

2,207件の閲覧回数
biafra
Senior Contributor I

Hi Jorge,

Many thanks for your answer.

You are right: I can load the code to the external SDRAM with the boot loader and it works fine, the problem is only in the debugging phase.

I will try your suggestion, but I was thinking if there is an alterntive way: I was thinking to some commands to send to the debugger to initialize the hardware and the SDRAM controller, then load the application directly to the SDRAM and finally set the PC and the SP to run the application. All these steps without the need to flashing the external flash memory.

Is this method possible with MCUXpresso or KDS?

Many thanks

Biafra