Debug in SDRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug in SDRAM

1,770 Views
biafra
Senior Contributor I

Hi everyone,

 

I'm working on a custom board based on K65FN2M0M18 using KDS 3.2.0 and Multilink Universal debugger.

The application I'm working on has to run in external SDRAM (4M x 32), so at runtime there is a bootloader that copies the application from the external flash where it is stored to SDRAM. The application is linked with relocation to the correct addresses.

I need to debug the application in SDRAM, but I cannot find any way to download the code there.

Which is the correct workflow in this application?

 

Many thanks

Biafra

Labels (1)
11 Replies

1,157 Views
biafra
Senior Contributor I

Hi everyone,

No one can help?

Many thanks

Biafra

1,157 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Biafra,

Sorry to reply you late.

If you want debug on external RAM, you need configure the linker file ,

there is a DOC about how to do in CW, while it is the same with KDS, you can refer to.

Relocating Code and Data Using the CW GCC Linker File for Kinetis   

pastedImage_2.png

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,157 Views
biafra
Senior Contributor I

Hi Alice,

 

Thank you for your answer.

You have focused the point! My problem is where to find the files specified in appendix C and D, where to specify to use them in KDS and which is the syntax to write them (maybe the same as CW?).

Many thanks

Biafra

1,157 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Biafra,

I'm very sorry for my last reply, it seems that we can not download project into SDRAM directly .

for in KDS, I have not find the debugger configure file like "init_kinetis.tcl" .

I will confirm it with KDS expert , then reply you .

BR

Alice

1,157 Views
biafra
Senior Contributor I

Hi Alice,

Do you have some news about?

Many thanks

Biafra

1,157 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Biafa,

I checked your another question, so suddenly I thought something.

Yes, in KDS, there isn't the two files "init_kinetis.tcl" and "*.mem" (appendix C and D)as that DOC mentioned,

while in the DOC, it said there are two methods :

pastedImage_1.png

So maybe you can use the second method replace the two files in the first method.

BR

Alice

1,157 Views
Vagni
Contributor IV

1,157 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Biafra,

You can relocate your code into SDRAM, about the detail steps

please refer to this DOC:

Relocating Code and Data Using the KDS GCC Linker File for Kinetis 

pastedImage_2.png

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,157 Views
biafra
Senior Contributor I

Hi Alice,

Many thanks for your answer. I have already read the document you have told me about.

I've not been clear: my problem is not how to relocate the code in SDRAM, this step has already been done. My problem is how I can load the code in SDRAM with the debugger probe in the debugging phase.

Many thanks

Biafra

1,157 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Biafra,

-After relocate  the code, the startup code will copy the code from FLASH to RAM,

so you needn't download code to RAM use debugger .

- About how to use debugger copy code from flash to RAM, you can find good answer at

P&E Customer Support :

P&E Microcomputer Systems: Over 30 years as an Industry leader in Embedded Systems Development Tools...  

BR

Alice

1,157 Views
biafra
Senior Contributor I

Hi Alice,

Thank you for your answer.

I need to better specify the project and correct my previous post: the custom board is based on K65FX1M0M18 chip (the K65FN2M0M18 chip is in the prototype board, not in the final one), so there is 1 MB flash.

1 MB flash is not enough to store the application (and maybe neither 2 MB), so there a 4 MB external flash (29LV320) where the application is stored. Then the boot loader (stored in the internal flash) copies the application from the external flash to SDRAM: this is the reason why I have to download the code to SDRAM using debugger in the debug phase.

I don't think that the only workflow I can use is write the application in the external flash then execute the boot loader that copies the application in the SDRAM execute it and finally attach with the debugger to the running application. The option to load the application to debug directly to SDRAM using the debugger was avaliable in the tool I use for 15 years in my past work (SDS debugger with Coldfire processor).

Many thanks

Biafra