Debugging MK20DN512ZVLQ10 with P&E Multilink - not programming flash

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

Debugging MK20DN512ZVLQ10 with P&E Multilink - not programming flash

764 Views
leccy
Contributor III

I have ported a project from CW10.3 to KDS 3.0.0.

 

The project compiles without errors and creates an ELF file.

 

I have been able to create a GDB PEMicro Interface Debugging debug connection, and using the Advanced Options on the Debugger tab, have been able to preserve a memory range for the boot-loader used on the project.

 

When debugging, KDS goes through the familiar process similar to CW10.3, preserves the correct memory range, erases the rest of the memory, and seems to program the project.

 

However, when running the project, it falls over, and it is obvious that the memory has NOT been programmed.  The same project can be debugged correctly on CW10.3.

 

One immediate concern is that the closest device I can choose is K20DN512ZM10.  However, if I choose an alternative algorithm on Advanced Options, and choose the algorithm used by CW10.3, I get the same outcome.

 

I noticed that a default setting when creating the connection is 'Use SWD protocol', which is not applicable to my part.

 

What it the obvious that i am missing?

 

All suggestions are welcome!

Labels (1)
0 Kudos
4 Replies

580 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Alex,

- Could you please create a simple project on KDS3.0 ,then use P&E Multilink to flash , test whether it can normal work.

- And you said when running , it error ,could you please screenshot the error, thank !

BR

Alice

0 Kudos

580 Views
leccy
Contributor III

Thanks Alice.

Its not really possible to get a screenshot of the error.

What happens is that the debug interface runs to start of main as usual, i click Play, and it runs until it hits startup code within the boot-loader already programmed on the part.  This is the preserved memory range i referred to in my original post.

The interface is obviously unable to show any source code alongside this stop in the boot-loader.

If i disconnect, and try to run the product by just powering it up (not on the KDS debugger), it is then obvious that it has no program on board, as the product then behaves as if it only has the boot-loader programmed.

I can re-program the part successfully with my original CW10 project.

So it seems that the KDS debugger is reading and re-programming the boot-loader preserved memory correctly, but not the project code.

I will try your suggestion of creating a simple project, and try to spot the bvious differences.

0 Kudos

580 Views
leccy
Contributor III

Tried a simple project (new, bare board), and i have been able to program and run on our prototype successfully.

I have also been able to prove that the main project will run on the prototype, and also the prototype will run on its own on a re-start away from the debugger, so i am happy that the flash memory is being programmed by the debugger.  However, this is with the proviso (see below) that i do not call any routines in the boot-loader memory space.

It seem that the issue that i have mis-interpreted is that the debugger is not happy when the program tries to call a routine in the boot-loader memory space.

I call the routines via a function call to a cast fixed memory address.

Even though there are no breakpoints at these calls, the debugger stops immediately with a message "No source available...".

CW10 does not exhibit this behaviour when debugging the same code.

Am i missing some settings to make the debugger ignore code it has no symbols for, even though there are no breakpoints set for that code?

Many thanks

Alex

0 Kudos

580 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Alex,

OK , waiting your result of test the simple project , and  you can only create a simple project without many functions ,

just test whether can work well with the P&E Multilink .

BR

Alice

0 Kudos