No Source Available KDS Debugger

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

No Source Available KDS Debugger

5,007 Views
joseph0577
Contributor III

I'm having issues debugging applications with Kinetis Design Studio (the applications are built with Processor Expert). Whenever the Debugger starts, I get an error stating that no source is available for a specified location. This location changes periodically. Once the application starts, whenever I try to pause the debugger (and sometimes without any input from me), another error appears stating that no source is available for the _vect_table() at 0x0. From then on, clicking on resume only pauses the debugger with the same error. Sometimes it is possible to use the step over button or breakpoints to allow the debugger to run again, but this causes strange things to happen to the application. For example, stepping over an operation on an integer variable does not cause the variable to change, but several steps later, the debugger will jump back to that operation and change the variable (although not entirely as expected for the mathematical operation). The strange behavior appears to be due to compiler optimization and has been removed during the debugging process. This problem exists even with a newly created project with absolutely no user code. I simply create a new KDS project with Processor Expert, click on the generate code button, create a debug config for the project and then debug, and the no source errors occur. This makes debugging my applications nearly impossible. Any help would be most appreciated. I am using the TWR-K21F120M, KDS 1.0.1 [beta], and the included USB OSJTAG as the connection for the debugger. Attached are three screenshots, two showing the error in the debugger for a newly created project and one showing the debug configuration I'm using. Any help would be greatly appreciated!

Labels (1)
19 Replies

2,645 Views
joseph0577
Contributor III

So an update. I believe (although I haven't fully tested this theory) is that every time I reboot, something is refreshed. The first time I try to debug after rebooting, it operates as expected. Every subsequent attempt results in a source not found error with a worst-case scenario of the error preventing any debugging. This may have something to do with the version of Eclipse that KDS is built on. If you search for this error associated with Eclipse instead of KDS, you will find that the standard Eclipse has, or used to have, this problem.

0 Kudos

2,646 Views
BlackNight
NXP Employee
NXP Employee

Hi Joseph,

can you share a link to what you have found in your research (having this to be an Eclipse problem)?

From your screenshot I see that you are using the drive X:\, so it could be related to virtual drivers?

What if you have the workspace on a physical disk (C:\), and/or KDS installed in C:\freescale too?

Erich

0 Kudos

2,646 Views
joseph0577
Contributor III

Here are some links I found from googling 'no source available for error debugging in eclipse'

debugging - Eclipse error "No source available for " - Stack Overflow

No source available for "main()" error for c++ in Eclipse - Stack Overflow

Debug problem: No source available | www.LPCware.com (this one isn't about Eclipse, but I'm including it anyway)

The Stack Overflow links link to other questions that have been asked that are similar.

It could be related to the virtual drivers, but I don't think so. Its been a while, but I'm pretty sure that I had this issue back when the workspace was on the C: drive. I can double-check.

KDS is installed in C:\Freescale. Or did you mean to install KDS to the X:\ network drive?

0 Kudos

2,646 Views
BlackNight
NXP Employee
NXP Employee

Hi Joseph,

I checked the links you provided, but they seem not be related to your problem. "No source available" is a common problem, especially if the path to the sources are not correct (e.g. library compiled on another host), or if there is no source/debug information.

I still hope that your X: drive might be the cause of your issue.

Erich

0 Kudos

2,646 Views
joseph0577
Contributor III

Yes, X: is a network drive. I'll test whether this has an effect or not soon. Right now I need to solve an issue with a J-link. :smileyhappy:

0 Kudos

2,646 Views
joseph0577
Contributor III

So I was able to run the debugger several times after copying the project over to the C: drive. However, it did throw one of the 'no source' errors for a gdb thread. This was not fatal, and I was able to successfully debug. However, once I allowed the debugger to run until the MK22 entered VCC1, then every time afterwards that I tried to run the debugger, I got a 'no source' fatal error that prevented debugging. I'm not 100% sure this was due to entering VCC1 while debugging (which necessitates starting a new debugging session, since the debugger is unable to handle the low power state), or a different error.

0 Kudos

2,646 Views
BlackNight
NXP Employee
NXP Employee

Thanks for the links.

I saw in

https://community.freescale.com/servlet/JiveServlet/download/406453-275606/debugError2.png

that you are using a workspace on drive X:

Having KDS on C:\freescale is fine.

But is your workspace on a physical drive to (e.g. C:\)?

I just think if X:\ is something weird, it could cause the symptoms you explain.

Especially if X: is a network drive or a thumb drive.

Erich

0 Kudos

2,646 Views
joseph0577
Contributor III

Unfortunately, this issue is still unresolved. I had hoped that updating to KDS 1.1.1 would solve it, but it did not. If anyone has any ideas what might be going on, I would really appreciate it.

0 Kudos

2,646 Views
DavidS
NXP Employee
NXP Employee

Hi Joseph,

I think removing old KDS and install new KDS.1.1.1 will help.  Kinetis Design Studio Integrated Development |Freescale

Let us know you success (or issue).

Regards,

David

0 Kudos

2,646 Views
joseph0577
Contributor III

Although I did not remove the old KDS, I have installed KDS 1.1.1, and still have the same issue. I made sure that I'm actually using KDS 1.1.1 (I am). I am, however, using the same workspace from the old KDS.

0 Kudos

2,646 Views
DavidS
NXP Employee
NXP Employee

Hi Joseph,

Please re-try with a new WorkSpace and report back.

If you can remove old I do that too.

Then also verify that the correct Windows Environmental Variable points to the KDS1.0.0 path.

Regards,

David

0 Kudos

2,646 Views
joseph0577
Contributor III

What Windows Enviromental Variable are you referring to, and where would I find it?

0 Kudos

2,646 Views
DavidS
NXP Employee
NXP Employee

Hi Joseph,

My apologizes...it is the KSDK_PATH that needs to be verified.

As reference please look at Appendix B: in the C:\Freescale\KSDK_1.0.0\doc\Kinetis SDK K64 User's Guide.pdf.

Regards,

David

0 Kudos

2,646 Views
joseph0577
Contributor III

Changing to a new workspace and creating a new project, then importing everything only worked for the first debug session. Once I stopped the debugger, modified the code, and then restarted, I got the no source error again. The modifications were minor (I simply changed the static index reference in a char array).

0 Kudos

2,646 Views
DavidS
NXP Employee
NXP Employee

Hi Joseph,

I'll try to reproduce your steps soon and see what happens.

Where are you installing the KDS and KSDK (i.e. what are the paths)?

Where do you place your WorkSpace?

What Host OS (guessing Win7 Pro)?

Have you updated the debugger firmware lately?

Regards,

David

0 Kudos

2,646 Views
joseph0577
Contributor III

Actually, I'm on a corporate PC running Windows 7 Enterprise. The install paths for KDS and KSDK are C:\Freescale\KDS_1.1.1 and C:\Freescale\KSDK_1.0.0. The workspace is on a shared drive. I have not updated the debugger firmware at all. I'm using a TWR-K21F120M with the GDB PEMicro USB interface. Also, this is a Processor Expert project. Thanks for looking into this.

0 Kudos

2,646 Views
BlackNight
NXP Employee
NXP Employee

Could it be that you have the watchdog enabled? That would explain why the debugger jumps back to the reset vector.

That 'source not found' happens if the debug view has not set the source location for your PC. You can get this for example if you download with a J-Link, but do not enable the 'continue' check box in the startup tab of the debug configuration.

However, for P&E this is automatically enabled. So I think what you see is that the program gets downloaded, and then runs and then runs into a problem (hard fault?). Can you set a breakpoin in the startup code so it stops and does not run until main()?

Or do assembly stepping after you have reached the state you show in the screenshots?

2,646 Views
joseph0577
Contributor III

I've attached another screenshot showing the debugger state at the automatic breakpoint set by the debugger at the Init call. Note that there has already been a no source error, but it was not fatal/prohibitive in any way. I've also attached a txt file that contains the console logs at this point and at the next no source error point.

0 Kudos

2,646 Views
joseph0577
Contributor III

It didn't occur to me until after I posted, but I think the reason the debugger will jump back and forth is due to optimization of the code. I turned off optimization it that behavior seemed to stop. However, I'm still having problems with the 'no source available' errors. Either way, the watchdog is disabled.

I don't think that I can perform assembly stepping once the 'source not found' error occurs. When I try, the assembly view flashes, but the step counter does not move. I can set a breakpoint in the startup code, and a screenshot is attached.

0 Kudos