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