Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Debug over serial in momentics: (16 Items)
   
Debug over serial in momentics  
Hello

Im using Momentics 4.5 on windows and QNX 6.4 on powerpc.

On the powerPC i start pdebug /dev/ser2,115200 and pdebug is in /proc/boot and it is also in the path.

In momentics i create a debug session PDebug serial and use /dev/ser1 and baudrate 115200.

When i select debug my i got this.

Failed Launching Serial Debugger
Error initializing: /dev/ser1: No such file or directory.
  Error initializing: /dev/ser1: No such file or directory.
  Error initializing: /dev/ser1: No such file or directory.


So the question is what should i set the serial device to in windows?

My comport is COM1

/lasse
Re: Debug over serial in momentics  
Lasse Skov wrote:
> Hello
> 
> Im using Momentics 4.5 on windows and QNX 6.4 on powerpc.
> 
> On the powerPC i start pdebug /dev/ser2,115200 and pdebug is in /proc/boot and it is also in the path.
> 
> In momentics i create a debug session PDebug serial and use /dev/ser1 and baudrate 115200.

Why /dev/ser1? In IDE you should specify your com port, in 
your case COM1.
RE: Debug over serial in momentics  
If i use COM1 i got this error.

Failed Launching Serial Debugger
Error initializing: com1: No such file or directory.
  Error initializing: com1: No such file or directory.
  Error initializing: com1: No such file or directory.

Re: Debug over serial in momentics  
Lasse Skov wrote:
> If i use COM1 i got this error.
> 
> Failed Launching Serial Debugger
> Error initializing: com1: No such file or directory.
>   Error initializing: com1: No such file or directory.
>   Error initializing: com1: No such file or directory.
> 

Just to make sure: you are using Windows host?

If so, make sure nothing else is using the port you specify. 
Also, make sure you put COM1 in capital letters.


---
Aleksandar
Re: Debug over serial in momentics  
It also depends on version of tools you are using 6.4.0 or earlier 
(cygwin (<=6.3.2) I think was using /dev/com1 or something like that 
even on windows)

Aleksandar Ristovski wrote:
> Lasse Skov wrote:
>   
>> If i use COM1 i got this error.
>>
>> Failed Launching Serial Debugger
>> Error initializing: com1: No such file or directory.
>>   Error initializing: com1: No such file or directory.
>>   Error initializing: com1: No such file or directory.
>>
>>     
>
> Just to make sure: you are using Windows host?
>
> If so, make sure nothing else is using the port you specify. 
> Also, make sure you put COM1 in capital letters.
>
>
> ---
> Aleksandar
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post30307
>
>   
Re: Debug over serial in momentics  
Elena Laskavaia wrote:
> It also depends on version of tools you are using 6.4.0 or earlier 
> (cygwin (<=6.3.2) I think was using /dev/com1 or something like that 
> even on windows)

If gdb version is 6.? then it is mingw and COM1 should be 
used. gdb 5.2.1 was cygwin.

You can check gdb version by typing "show version" in gdb 
console in your IDE, or by starting gdb from cmd.exe:
C:>ntox86-gdb



> 
> Aleksandar Ristovski wrote:
>> Lasse Skov wrote:
>>   
>>> If i use COM1 i got this error.
>>>
>>> Failed Launching Serial Debugger
>>> Error initializing: com1: No such file or directory.
>>>   Error initializing: com1: No such file or directory.
>>>   Error initializing: com1: No such file or directory.
>>>
>>>     
>> Just to make sure: you are using Windows host?
>>
>> If so, make sure nothing else is using the port you specify. 
>> Also, make sure you put COM1 in capital letters.
>>
>>
>> ---
>> Aleksandar
>>
>>
>> _______________________________________________
>> General
>> http://community.qnx.com/sf/go/post30307
>>
>>   
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post30312
> 

RE: Debug over serial in momentics  
Yes.. and got this output.

GNU gdb 6.7 qnx-nto (rev. 233)
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "--host=i386-mingw32msvc
--target=i386-pc-nto-qnx6.4.
0".
(gdb)
Re: Debug over serial in momentics  
Lasse Skov wrote:
> Yes.. and got this output.
> 
> GNU gdb 6.7 qnx-nto (rev. 233)
> Copyright (C) 2007 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>;
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "--host=i386-mingw32msvc
> --target=i386-pc-nto-qnx6.4.
> 0".
> (gdb)
> 


Ok, then use "COM1" in capital letters (without the 
quotation marks). Make sure nothing else is using COM1.
Re: Debug over serial in momentics  
> Ok, then use "COM1" in capital letters (without the 
> quotation marks). Make sure nothing else is using COM1.

I think this will work. Now i got a timeout in momentics.
So i will try when i come to the target again, and hope this will work.
Re: Debug over serial in momentics  
Lasse Skov wrote:
>> Ok, then use "COM1" in capital letters (without the 
>> quotation marks). Make sure nothing else is using COM1.
> 
> I think this will work. Now i got a timeout in momentics.
> So i will try when i come to the target again, and hope this will work.

Timeout now means COM1 port was opened, but target did not 
respond. Now you have to make sure you connect cable to your 
target and then start pdebug on target's port /dev/ser? .




Re: Debug over serial in momentics  
When i try now connected to the powerPC i got a upload error.
Is it because i need somting in my PowerPC BSP?
RE: Debug over serial in momentics  
what error and what are doing when you getting it?
You uploading binary for debugging? Does you system has /tmp read-write
folder? 

-----Original Message-----
From: Lasse Skov [mailto:community-noreply@qnx.com] 
Sent: June 2, 2009 10:07 AM
To: general-ide
Subject: Re: Debug over serial in momentics

When i try now connected to the powerPC i got a upload error.
Is it because i need somting in my PowerPC BSP?

_______________________________________________
General
http://community.qnx.com/sf/go/post30529
Re: RE: Debug over serial in momentics  
Now its working. After i restarted momentics.
Re: Debug over serial in momentics  
>On the powerPC i start pdebug /dev/ser2,115200 

How many com ports you have on the host? On target?
You can test connection without debugging
by trying terminal from IDE on this port (no pdebug should be running in 
this case).

If it is good terminal has to be closed to try debugging over the same 
connection.


Lasse Skov wrote:
> Yes.. and got this output.
>
> GNU gdb 6.7 qnx-nto (rev. 233)
> Copyright (C) 2007 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>;
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "--host=i386-mingw32msvc
> --target=i386-pc-nto-qnx6.4.
> 0".
> (gdb)
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post30314
>
>   
Re: Debug over serial in momentics  
> Just to make sure: you are using Windows host?
> 
> If so, make sure nothing else is using the port you specify. 
> Also, make sure you put COM1 in capital letters.
> 
> 
> ---
> Aleksandar


Yes my host is a windows pc with one com port COM1

And the target have two com port /dev/ser1 and /dev/ser2 and both working with a terminal. And i have no terminal 
running on the port i setup the debugger.
Re: Debug over serial in momentics  
I also got a problem trying to debug over serial.
I'm using QNX 6.2.1 on a windows 2000 host and a ppc 800 as target.
On the target i've got 2 serial ports. \dev\ser1 is used for console the other one for serial debugging. I start pdebug 
as: pdebug \dev\ser2,115200 &

I start debugging on serial port COM2 on 115200.

Exception occured while launching configuration. See log for more information
Reason: Failed Launching Serial Debugger: Error initializing: Timedout

After that i have to restart momentics because else i get an permission denied error.

I am sure the serial connection is correct.  When using a serial port monitor i see the following (didn't paste the 
complete connection) :

// Cut some communication.

Answer: 2009-09-21 13:06:35.63864 (+0.0000 seconds)
 7E A3 00 02 01 40 00 00 00 00 00 00 00 00 00 00   ~£...@..........
 00 00 00 00 00 19 7E                              ......~         

Request: 2009-09-21 13:06:35.65364 (+0.0156 seconds)
 7E 8F 00 03 01 00 00 03 01 00 00 01 FF 2F 74 6D   ~..........ÿ/tm
 70 2F 68 65 6C 6C 6F 77 6F 72 6C 64 5F 67 00 00   p/helloworld_g..
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
// cut more 000
 00 00 00 00 00 00 00 00 00 00 00 00 00 B7 7E      .............·~ 

Answer: 2009-09-21 13:06:36.93564 (+0.0313 seconds)
 7E A3 00 03 01 00 00 00 00 58 7E                  ~£.......X~     

Request: 2009-09-21 13:06:36.93564 (+0.0000 seconds)
 7E 91 00 04 01 7F 45 4C 46 01 02 01 00 00 00 00   ~‘...ELF.......
 00 00 00 00 00 00 02 00 14 00 00 00 01 48 04 59   .............H.Y
//cut more data.


The information in the log file from QNX is:
!SESSION Sep 21, 2009 12:58:30.827 ---------------------------------------------
java.version=1.3.1_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_NL
Command-line arguments: -os win32 -ws win32 -arch x86 -feature com.qnx.tools.ide -install file:C:/QNXsdk/host/win32/x86/
usr/qde/eclipse/
!ENTRY org.eclipse.debug.ui 4 120 Sep 21, 2009 12:58:30.827
!MESSAGE Error logged from Debug UI: 
!STACK 1
org.eclipse.core.runtime.CoreException[150]: org.eclipse.cdt.debug.core.cdi.CDIException: Error initializing: Timedout
	at com.qnx.tools.ide.qde.debug.internal.core.CGDBDebugger.createSerialLaunchSession(CGDBDebugger.java:197)
	at com.qnx.tools.ide.qde.debug.core.QDEDebugCorePlugin.getSerialLaunchSession(QDEDebugCorePlugin.java:84)
	at com.qnx.tools.ide.qde.internal.ui.launch.SerialLaunchConfigurationDelegate.launch(SerialLaunchConfigurationDelegate.
java:69)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:136)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog$10.run(LaunchConfigurationDialog.java:
2299)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
!ENTRY com.qnx.tools.ide.qde.ui 4 150 Sep 21, 2009 12:58:30.827
!MESSAGE Failed Launching Serial Debugger : Error initializing: Timedout
!STACK 0
org.eclipse.cdt.debug.core.cdi.CDIException: Error initializing: Timedout
	at com.qnx.tools.ide.qde.debug.internal.core.CGDBDebugger.createSerialLaunchSession(CGDBDebugger.java:197)
	at com.qnx.tools.ide.qde.debug.core.QDEDebugCorePlugin.getSerialLaunchSession(QDEDebugCorePlugin.java:84)
	at com.qnx.tools.ide.qde.internal.ui.launch.SerialLaunchConfigurationDelegate.launch(SerialLaunchConfigurationDelegate.
java:69)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:136)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog$10.run(LaunchConfigurationDialog.java:
2299)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)