LPC54608 - debug application from SDRAM using J-Link and OZone.

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC54608 - debug application from SDRAM using J-Link and OZone.

240 Views
jose_araujo
Contributor II

Hi, I need to load and debug my application in SDRAM on a LPC54608. Is there a script for J-Link to allow this? 
I know that the MPU needs to be configured in order to be possible to execute the code from SDRAM so that is one of the things that the J-Link needs to configure before running the application. 

Labels (1)
0 Kudos
9 Replies

231 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jose,

Pls refer to the community, it talks about how to configure MPU, how to configure SDRAM so that the you  can save code in SDRAM and run in SDRAM directly.

 

https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/Executing-code-in-SDRAM-for-LPC-family/t...

Hope it can help you

BR

XiangJun Rong

0 Kudos

223 Views
jose_araujo
Contributor II

Hi xiangjun,

Thank you for your quick reply. 

That is not exaclty what I need, I'm not able to use the internal flash for my application.

I need a .jlinkscript that configures the clocks, pins, sdram and mpu so that the debugger can access the sdram a load the code.

I'm already able to do all of that using a secondary bootloader, but I also need to load the code into the sdram directly using the jlink otherwise I cannot debug my project. 

 

Cheers,

Jose

0 Kudos

218 Views
frank_meyer
Senior Contributor I

I think this will not work.

Take a look at the datasheet (LPC546xx.pdf), page 10. The EMC is not connected to the I-bus, which would be a requirement to execute code from.

0 Kudos

215 Views
jose_araujo
Contributor II

I'm able to run code from the SDRAM using a secondary bootloader to configure the SDRAM and MPU to allow code execution from SDRAM. 

The application note AN12423 explains how to do it. 

0 Kudos

193 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I am not familiar with the script file format, I will ask AE team and check if they are familiar with the script file of J-Link. I will give you a feedback before  the end of this week.

BR

XiangJun Rong

174 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jose,

I have asked the AE team, it appears that nobody is familiar with the J-LINK device script file format, as you know that J-LINK is third party(Segger) product, you 'd better ask J-LINK support team. I have searched how to write peripheral register with script file based on J-LINK device, it appear you can not write register directly, this is the case in J-LINK forum:

https://forum.segger.com/index.php/Thread/2307-How-to-write-a-value-to-a-register-in-jlink-script-fi...

 

Hope it is helpful

BR

XiangJun Rong

0 Kudos

169 Views
jose_araujo
Contributor II

Hi XiangJun,

Thanks for looking into this. I'm trying to write the script my self, is not an easy task but I think I'm getting there. That thread in J-LINK forum is from 2015, maybe that was true at the time but now I certanly can write to the peripherals registers before loading the code into the SDRAM.

NXP provides the .jlinkscript in the iMX RT1064 SDK examples projects so not sure why then are saying they are unfamiliar with that script. Maybe not the same team. 

Cheers,

Jose

0 Kudos

164 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jose,

This is a script for LPC43xx, I attach it here, hope it can help you.

From the script, it appears that the code requires to be compiled before using, right?

BR

Xiangjun Rong

 

Tags (1)
0 Kudos

161 Views
jose_araujo
Contributor II

Hi Xiangjun, 

Thanks, I will have a look at this example to see if there is something that I missing on mine. 

Yes, compile the code first and then j-link runs the script before loading the compiled code into the SDRAM.

Cheers,

Jose 

0 Kudos