I am trying to do some basic tests using the new KDS v1.1.0 and am getting some strange errors. (See attached) Any ideas on why this error is happening?
Thanks,
John Baker
I decided to start from scratch. I created a new workspace folder, created a blank project called 'test', created a debug configuration for the USB port then hit 'debug' button within the 'debug configuration' window. It failed because it had not been built yet. Ok, I hit 'Build Project', then after complete I hit 'Debug'. It did not see my Debug Configuration I had just created for the 'test' project. I tried several times, different sequences,,,, still no go. Going to have to go back to Code Warrior until the next version I think. :-(
Hi John,
I did exactly your steps you described, and at the end, that debug configuration is always present for me:
However, it will still report an error to debug and complains about the "program file does not exist":
Actually, it is not that the program file does not exist: it cannot find it because not specified:
specifient the project name and .elf file then allows debugging it.
Maybe this has been your problem?
Erich
John,
can you share you project, especially the launch configuration settings?
To share the debug/launch configration settings,make sure you select 'share file', see
Sharing Debug Configuration with Eclipse | MCU on Eclipse
Erich
One thing I just noticed is that I am getting a 'Target MCU mismatch' warning. I am using a K64 Tower board (MK64FN1M0VMD12) and the Debug Configuration does not have an option for that board so I had to select K64FN1M0M12. Not sure if this has anything to do with the problem I am having.
John
-----------------------------------------------------------------------------------------------------------------
P&E GDB Server, Version 5.07.00.00
Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved
Loading library C:\Freescale\KDS_1.1.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.0.9.201407221237\win32\gdi\unit_ngs_arm_internal.dll ... Done.
Command line arguments: -device=K64FN1M0M12 -startserver -serverport=7224 -interface=OPENSDA -port=USB1 -speed=5000 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0
Device selected is k64fn1m0m12
User Specified Hardware Selection : Interface=OPENSDA and Port=USB1
Connecting to target.
OpenSDA detected - Flash Version 1.14
Warning 17927. Target MCU mismatch. Download performance limited. See http://www.pemicro.com/opensda/pe_tools.cfm for information on debugging external processors.
Device is K64FN1M0M12.
Mode is In-Circuit Debug.
Hi John,
for the 'target CPU mismatch' I have found a solution:
There is an updated .bin file from P&E:
DEBUG-FRDM-K64F_Pemicro_v108b_for_OpenSDA_v2.1.bin
Go to https://www.pemicro.com/opensda/ and download the Firmware apps zip file.
In there, you find the above updated OpenSDA file. Program it to your OpenSDA on your board, and that message about Target CPU mismatch goes away.
Erich
Hi Erich,
I installed the updated file from your previous email and it appears to have fixed the CPU mismatch issue. Thanks.
But,,,, I ran the program in debug mode. It appeared to be running but when I set a breakpoint on my “for(;;){ int l=0;}” statement it did not break. I removed the breakpoint then hit the ‘Pause’ button to see if I could see what part of the program it was in and nothing happened. The red stop button went away ON THE TOP BAR like it was no longer running, but at the bottom on the CONSOLE window to the right the red ‘stop’ square was still lit up (I did not notice this until after I took the snapshot of the screen. The lower right corner of the Task Manager window partially covers it). So I have no way of resuming it. I Clicked the red stopbutton on the console window and it closed the debug session down as it should. The arm-non-eabi-gdb.exe process also shut down as it should.
I clicked the Debug button again. After it started running I set a breakpoint in my “for(;;){ int l=0;}” line again and it still did not break. I clicked the PAUSE button to try to see where it was at in the code and again, nothing happened and I must now click the read button to exit debug mode.
I zipped up the entire KDS workspace with my test project and attached it to this email in case you would like to take a look at it.
Thanks,
John
That Test project did not had the debug configuration saved (see Sharing Debug Configuration with Eclipse | MCU on Eclipse), so not sure if this is a debugger setting problem.
I was able to debug that project on my side, and have not seen the issue. Maybe it is really in the debug/launch configuration settings?
I have attached your test project, but this time with the P&E launch config added.
Erich
Hmmmm,
I imported the test project you sent me and tried running it. It prompted me for a debugger and only gave me two options: gdbserver and remote gdb/mi, neither of which worked. I created the ‘GDB PEMicro Interface Debugging launcher’ as I did before using the ‘OpenSDA Embedded Debug – USB Port’ interface and not get the same weird errors as before.
Do you have TeamViewer on your computer? Perhaps you can connect to my computer and I can show you the steps that I am using if you have time sometime?
John Baker
Hi John,
I don't have Team Viewer. But I think I see what you mean:
You had this dialog, but the sad thing with GDB is that this is a dead end does not work: you cannot select the debug configuration that way :-(
Yes, yes, yes, that's weird :smileysad:.
Instead, select the debug configuration from the drop down, or from the launch configs.
I tried to explain these kind of Eclipse/gdb-isms in GDB Debugging with Kinetis Design Studio, so you might go through that one if not already done.
Erich
Hi Erich,
I went step by step through the instructions on your GDB Debugging with Kinetis Design Studio <https://community.freescale.com/docs/DOC-101845> . The only obvious thing I was doing different was accessing the Debug Configuration window by right clicking on the project then going to Debug as -> Debug Configuration instead of Run -> Debug configuration.
The results were the same though. It runs fine the first time only. See attached.
John
Just to be sure: that screen shot shows me that it is running fine (stoped at main). But there is a left-over from another debug session ("no source file found") which you can close. So that looks ok?
Yes, it does appear to keep running. I just copied a main.c bare board CodeWarrior source file to a new KDS project and ran it. I still get the ‘No source available’ error but it appears to be running just fine. It measures timings and the timings are different but that probably has to do with the KDS compiler optimizations which look different than CodeWarrior. I will continue using KDS now and see what happens.
Thanks!
John
Hi John,
your device selection is correct, and I have that message with my board too (I already had contacted P&E about the message). So I don't think this is the cause of your problem.
Just one thing which comes to my mind: can you check what breakpoints you have set (breakpoints view)? Could it be that you have some breakpoints set for other projects or old projects somehow. I just think that the debugger tries to resolve them, they point to 0x530 as source, but this does not exist for your project. Just some thinking....
Erich
Erich,
That definitely could be a possible explanation to some of the problems I have been seeing. I’ve seen warning and error messages pointing to other open projects that should not have been referenced in the current build.
I’ve also tried creating a blank PE program from scratch, add just 1 line of code (for(;;){}). I then set a breakpoint on line 47 (See attached snapshot) ‘PE_low_level_init();’ then start debugging. It hangs until I remove the breakpoint then crashes with a ‘Failed to execute MI command’ error which is a new one on me. I was going to show you another error but then this one happened.
P.S. Tried with no breakpoints also. It set a temporary one when it ran at the ‘PE_low_level_init();’ statement.
John B.