KDS V3.0.0 unable to debug code reside in FlexNVM, using USBDM

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

KDS V3.0.0 unable to debug code reside in FlexNVM, using USBDM

Jump to solution
493 Views
madisonchou
Contributor III

Hi, I am porting CW10 project to KDS and encounter difficulties when debugging with latest USBDM (V4.12.1.30). Our target is MK10DX128M7.   I just created the simplest example project with main.c having for (;;) { i++; }.  Compile and debug.   It works fine.   Then, in the linker file MK10DX128xxx7_flash.ld, just change from

  m_text                (RX)  : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0

to

  m_text                (RX)  : ORIGIN = 0x10000000, LENGTH = 0x00008000

Recompile and debug.   KDS IDE complains:

pastedImage_173.png

I am assuming the problem is that KDS IDE doesn't recognize the FlexNVM region.  I search web and understand that since USBDM 4.9.5, it added support for FlexNVM partitioning in Kinetis devices.   But in KDS IDE or USBDM, I can't find anywhere that allow me to set the region as legal.

Does anyone know a fix for this??

0 Kudos
1 Solution
350 Views
madisonchou
Contributor III

Hi pgo,

Thanks for prompt response.   It works nicely!

Hope this will help others too.

Jei

View solution in original post

0 Kudos
2 Replies
350 Views
pgo
Senior Contributor V

Hi Jei,

I had not anticipated the debugger needing to program the FlexNVM so the GDB server is failing to report that range of memory as programmable.

I will correct this in the next release.

In the interim you can try the updated device file attached.  This is a hack but it worked for a similar device.

You will need to replace the file "C:\Program Files (x86)\pgo\USBDM ....\DeviceData\arm_devices.xml" with the attached file.

Please advise if it works.

0 Kudos
351 Views
madisonchou
Contributor III

Hi pgo,

Thanks for prompt response.   It works nicely!

Hope this will help others too.

Jei

0 Kudos