Topic
16 replies Latest Post - ‏2013-04-05T20:39:12Z by richard.france
SystemAdmin
SystemAdmin
2260 Posts
ACCEPTED ANSWER

Pinned topic Data retrieval is not working in TARGET-HOST setup

‏2013-01-24T15:53:38Z |
Hi,
I am trying to develop a TDP for Diab Compilar on the Wind river Workbench Simulator and vxworks OS. I was able to generate linker output(vxWorks Image). Also i was able to flash in target without any issue. Studio invoke windriver workbench debug mode and connected to shell window. In shell window i have used command "->main enter" and after that exit from shell window. But i was not able to see any file generated which i was opened in in the TDP section usr_init and usr_open section. I have used INCLUDE_WDB option. Target and Host is connected through TCP/IP.

In formation :
1. I was able to see the file name in shell window by using printf("%s",fileName) in usr_init and usr_open function of TDP;
2. Also i was able to see the trace dump data in shell window by using prinf("%s",s) in usr_writeln function of TDP.

Please help me how can i generate "tmpatutrace.rio" file in host machine since this file i have opened in usr_init and usr_open functions of TDP.

Many Thanks in advance.

Regards
Abhisake
Updated on 2013-04-05T20:39:12Z at 2013-04-05T20:39:12Z by richard.france
  • richard.france
    richard.france
    814 Posts
    ACCEPTED ANSWER

    Re: Data retrieval is not working in TARGET-HOST setup

    ‏2013-01-24T16:22:56Z  in response to SystemAdmin
    Good job until now.
    As you can see into the delivered TDP list there are multiple TDP for VxWorks. most of them use WTX protocol to upload data from target to the host.
    It look like your target has no file system or you have no idea where the file is saved on your disk.
    So either you use the file system and you looking for the file on you complete disk space:
    (Last time I used this way I had tu set the basic setting key NOPATHOUT and the file was saved into c:\VXWORKS)

    OR you use the TCP/IP mechanism that launch a listener on the host machine to receive the result content via socket.
    (set SOCKET in TDP> library settings>data retrieval instead of USR and set the basic setting key SOCKET_UPLOAD=”true”)
    in this case the host address and port are automatically generated into products.h and embedded into the application to reach the host listened from the target.

    OR you start rtrtwrtx3.exe delivered into target/xml/attolcc as WTX listener from the execution function and data retrieval uses WTX events RTRTOPENF,RTRTWRITE,RTRTCLOSE as shown into the delivered cwinvxsim.xdp
    • SystemAdmin
      SystemAdmin
      2260 Posts
      ACCEPTED ANSWER

      Re: Data retrieval is not working in TARGET-HOST setup

      ‏2013-01-25T06:42:09Z  in response to richard.france
      Hi Richard,
      Many thanks to you for reply very soon.

      Your idea is absolutely correct means i was not able to find "where the file is saved on my disk". I have used vxWorks standard file system and WDB communication is enabled. Ihave used the data retrieval section as it is like supplies TDP "cwinvxppc" only thing i modified execution function in build setting. below is my execution function
      my $Debugger=$Ini{'DEBUGGER'};
      #unlink($out);
      #unlink("log.txt");
      #copy("$INTDIR\\vxWorks","$exe");
      copy("$TARGETDIR/cmd/run.cmd","run.cmd");
      #SystemP("run.cmd");
      #SystemP("$Debugger \"$exe\"");
      #SystemP("$Debugger -mode debug");
      SystemP("$Debugger -mode debug $parameters > $out");
      SystemP("ping 172.20.19.224");
      #open(IN,"<$INTDIR/atl.out") or die("Cannot open atl_buffer dump file");
      print"exe = $exe\n";
      print "out = $out \n";
      #copy("$INTDIR/atl.out",$out);
      #return (open("atl.out", "r"));
      RenameFile("tmpatutraces.rio", $out) ;

      open(IN,"<$out" );

      open(OU,">$out.tmp");
      while(<IN>)
      {
      chomp;
      $flag=1 if(!/^0x/);
      next if(!/^0x/);
      next if($flag==0);
      ~s/^0x00//;
      print OU chr hex($_) if($_ ne "00");
      $flag=0 if($_ eq "00");
      }
      close(IN);
      close(OU);
      copy("$out.tmp","$out");
      return(0);

      Also i have used in the TDP section "include file or code visible........."
      #ifdef USE_ATU
      char * atu_traces_file()
      {
      return("tmpatutraces.rio");
      }
      #endif

      I will try to use your idea about WTX and TCP/IP socket.

      Regards
      Abhisake
      • SystemAdmin
        SystemAdmin
        2260 Posts
        ACCEPTED ANSWER

        Re: Data retrieval is not working in TARGET-HOST setup

        ‏2013-01-25T11:06:57Z  in response to SystemAdmin
        Hi Richard,
        I have tried to use WTX in execution function. Cmd window opened was opened but it was not closing. If i closed force fully then i was getting ^cNO RIO instruction found.

        I have used below code for execution

        my $TargetName=$Ini{'TARGETNAME'};
        my $newWin="$ENV{'COMSPEC'} /c start ";
        my $rtrtWtx="$TARGETDIR\\cmd\\rtrtWtx2.exe";
        my $entry = $ATL_MAIN_PROCEDURE;
        $entry="Tmain" if ($entry eq '');
        unlink($out);
        #
        # $filesList contains the list of module(s) to be loaded. It may contain more than one. e.g:
        # my $filesList="obj1.out,obj2.out,$exe,obj3.out";
        # my $filesList=$exe;

        $ret=SystemP("$newWin /w $rtrtWtx -load -unload -list C:/RTRT_PRJ/Lab_Test/rtrtobjlist.lst -entry $entry -t",$TargetName);
        RenameFile("tmpatutraces.rio", "$out") if ($ATUMODE);
        return $ret;

        TARGETNAME i have define in build setting for C with value VxWORS6_172.20.19.224.
        • richard.france
          richard.france
          814 Posts
          ACCEPTED ANSWER

          Re: Data retrieval is not working in TARGET-HOST setup

          ‏2013-01-25T17:55:55Z  in response to SystemAdmin
          Here is the log of the TDP tutorial add example using the cwinVxRtpWB3.xdp which is the latest TDP I have made
          This TDP is delivered out of the box. It is dedicated to the WorkBench version of vxworks-6.7
          As you can see I use rtrtWtx3.exe which use the latest WTX API
          and the target name is vxsim0@myMachineName because I use the x86 simulator, but it could be <targetIP>@hostname
          this target name can be a regular expression that must uniquely match a registered server for the connection to succeed.
          In addition the target server must be running before trying to execute. So this TDP checks if the target server is running and start one if necessary.
          Note This TDP is for RTP project only, so I do not know if you can use it as is (depend on your project type), but you can copy most of its part for your TDP. (main is the entry point for RTP project type and Tmain for system project type)

          
          Preprocessing PTU test script file... C:\PROGRA~1\IBM\TESTRE~1\bin\intel\win32\attolpreproC 
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\add.ptu"      
          "cwinVxRtpWB3\Tadd.c"      -studio_log=
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\intermediates_files91813665.log" -STD_DEFINE=
          "C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4\ana\atus_c.def" -RENAME=stubs_rename.opt -TSF=
          "cwinVxRtpWB3\add.tsf" -incl=
          "C:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h",
          "C:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip",
          "C:\CrossEnv\WindRiver\vxworks-6.7/target/h",
          "cwinVxRtpWB3" -define=
          "_C99",
          "_HAS_C9X",
          "_VX_CPU=_VX_PENTIUM",
          "_VX_TOOL_FAMILY=gnu",
          "_VX_TOOL=gnu" -NOSIMULATION -FAST TestRT-I-STARTEXEC,  IBM(R) Rational(R) Test RealTime C Test Script Compiler 8.0.0.3.339.012 TestRT-I-COPYRIGHT,  (C) Copyright IBM Corp. 1992-2011 All Rights Reserved. All rights reserved. cwinVxRtpWB3\Tadd.c: Preprocessing... ccpentium -E 
          "cwinVxRtpWB3\Tadd.c"  
          "-D_C99" 
          "-D_HAS_C9X" 
          "-D_VX_CPU=_VX_PENTIUM" 
          "-D_VX_TOOL_FAMILY=gnu" 
          "-D_VX_TOOL=gnu"  
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/h" 
          "-IcwinVxRtpWB3" -g -mtune=pentium -march=pentium -ansi -mrtp   -o 
          "cwinVxRtpWB3\Tadd_aug.i" TestRT-I-ENDNOENWR,  End of execution with 0 error and 0 warning C:\PROGRA~1\IBM\TESTRE~1\bin\intel\win32\attolccp 
          "cwinVxRtpWB3\Tadd_aug.i" 
          "cwinVxRtpWB3\Tadd_aug.c" atus_c.def atl.opp  -exfile=
          "cwinVxRtpWB3\Tadd.c" -noinstrdir=
          "C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4" -proc=ret -block=logical -trace -mempro -perfpro   -studio_log=
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\intermediates_files91813665.log" --- cwinVxRtpWB3\Tadd_aug.c: Compiling... ccpentium -c 
          "cwinVxRtpWB3\Tadd_aug.c"  
          "-D_C99" 
          "-D_HAS_C9X" 
          "-D_VX_CPU=_VX_PENTIUM" 
          "-D_VX_TOOL_FAMILY=gnu" 
          "-D_VX_TOOL=gnu"  
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/h" 
          "-IcwinVxRtpWB3" -g -mtune=pentium -march=pentium -ansi -mrtp  -fno-strict-aliasing -MD -MP -o 
          "cwinVxRtpWB3\Tadd.o" --- add.c: Preprocessing... ccpentium -E 
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\add.c"  
          "-D_C99" 
          "-D_HAS_C9X" 
          "-D_VX_CPU=_VX_PENTIUM" 
          "-D_VX_TOOL_FAMILY=gnu" 
          "-D_VX_TOOL=gnu"  
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/h" -g -mtune=pentium -march=pentium -ansi -mrtp   -o 
          "cwinVxRtpWB3\add.i" --- add.c: Instrumenting using TDP 
          "C VxWorks 6.x RTP vxsim" in 
          "C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4"... C:\PROGRA~1\IBM\TESTRE~1\bin\intel\win32\attolccp 
          "cwinVxRtpWB3\add.i" 
          "cwinVxRtpWB3\add_aug.c" atus_c.def atl.opp  -noinstrdir=
          "C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4" -proc=ret -block=logical -trace -mempro -perfpro   -studio_log=
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\intermediates_files91813659.log" add.c: Compiling... ccpentium -c 
          "cwinVxRtpWB3\add_aug.c"  
          "-D_C99" 
          "-D_HAS_C9X" 
          "-D_VX_CPU=_VX_PENTIUM" 
          "-D_VX_TOOL_FAMILY=gnu" 
          "-D_VX_TOOL=gnu"  
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/h" -g -mtune=pentium -march=pentium -ansi -mrtp  -fno-strict-aliasing -MD -MP -o 
          "cwinVxRtpWB3\add.o" --- Compiling C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4\lib\TP.c using cwinVxRtpWB3/products.h containing C/C++ TDP Library settings... ccpentium -c 
          "C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4\lib\TP.c"  
          "-D_C99" 
          "-D_HAS_C9X" 
          "-D_VX_CPU=_VX_PENTIUM" 
          "-D_VX_TOOL_FAMILY=gnu" 
          "-D_VX_TOOL=gnu"  
          "-IcwinVxRtpWB3" 
          "-IC:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4\lib" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/h/wrn/coreip" 
          "-IC:\CrossEnv\WindRiver\vxworks-6.7/target/h" -g -mtune=pentium -march=pentium -ansi -mrtp  -fno-strict-aliasing -MD -MP  -o 
          "cwinVxRtpWB3\TP.o" Linking .\cwinVxRtpWB3\add.vxe... ccpentium  -g -nostdlib -Wl,-X -o 
          ".\cwinVxRtpWB3\add.vxe"  
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\cwinVxRtpWB3\Tadd.o" 
          "C:\Program Files\IBM\TestRealTime\examples\TDP\tutorial\cwinVxRtpWB3\add.o" 
          "cwinVxRtpWB3\TP.o"  
          "-LC:\CrossEnv\WindRiver\vxworks-6.7/target/usr/lib/pentium/PENTIUM/common"   -Wl,-M  >map.map --- #Time:Fri Jan 25 18:30:47 2013 Executing .\cwinVxRtpWB3\add.vxe  ... C:\WINDOWS\system32\cmd.exe /c start 
          "starting simulator" 
          "C:\CrossEnv\WindRiver\vxworks-6.7\host\x86-win32\bin\vxsim.exe" -f 
          "C:\CrossEnv\WindRiver\vxworks-6.7\target\config\simpc\vxWorks" -p 0 -d passDev -tn vxsim0 TestRT-I-STARTEXEC,  IBM(R) Rational(R) Test RealTime Win32 Application Killer TestRT-I-COPYRIGHT,  (C) Copyright IBM Corp. 2005 All Rights Reserved. All rights reserved. Process wtxregd.exe not found C:\WINDOWS\system32\cmd.exe /c start 
          "starting simulator" 
          "C:\CrossEnv\WindRiver\workbench-3.1\foundation\x86-win32\bin\wtxregd.exe" TestRT-I-STARTEXEC,  IBM(R) Rational(R) Test RealTime Win32 Application Killer TestRT-I-COPYRIGHT,  (C) Copyright IBM Corp. 2005 All Rights Reserved. All rights reserved. Process tgtsvr.exe not found C:\WINDOWS\system32\cmd.exe /c start 
          "starting simulator" 
          "C:\CrossEnv\WindRiver\workbench-3.1\foundation\x86-win32\bin\tgtsvr.exe" -n vxsim0 -B wdbpipe vxsim0 -V -R C:/ -RW -Bt 3 -A C:\WINDOWS\system32\cmd.exe /c start /w C:\PROGRA~1\IBM\TESTRE~1\targets\CWINVX~4\cmd\rtrtWtx3.exe -load -unload -list .\cwinVxRtpWB3\add.vxe -entry main -t vxsim0@myMachineName Splitting 
          'cwinVxRtpWB3\\add.spt' traces file...
          
          • SystemAdmin
            SystemAdmin
            2260 Posts
            ACCEPTED ANSWER

            Re: Data retrieval is not working in TARGET-HOST setup

            ‏2013-01-28T15:22:25Z  in response to richard.france
            Thanks Richard,
            I have tried your said process. I was able to connect target server by using your said process. But i was getting getting "No trace found error",
            I am using "rtrtWtx2.exe" instead of "rtrtWtx3.exe" since i don't have "rtrtWtx3.exe". When i was doing the below steps

            C:\WINDOWS\system32\cmd.exe /c start "starting simulator" "C:\CrossEnv\WindRiver\vxworks-6.7\host\x86-win32\bin\vxsim.exe" -f "C:\CrossEnv\WindRiver\vxworks-6.7\target\config\simpc\vxWorks" -p 0 -d passDev -tn VxWorks6x_172.20.19,224
            TestRT-I-STARTEXEC, IBM(R) Rational(R) Test RealTime Win32 Application Killer
            TestRT-I-COPYRIGHT, (C) Copyright IBM Corp. 2005 All Rights Reserved. All rights reserved.
            Process wtxregd.exe not found
            C:\WINDOWS\system32\cmd.exe /c start "starting simulator" "C:\CrossEnv\WindRiver\workbench-3.1\foundation\x86-win32\bin\wtxregd.exe"
            TestRT-I-STARTEXEC, IBM(R) Rational(R) Test RealTime Win32 Application Killer
            TestRT-I-COPYRIGHT, (C) Copyright IBM Corp. 2005 All Rights Reserved. All rights reserved.
            C:\WINDOWS\system32\cmd.exe /c start "starting simulator" "C:\CrossEnv\WindRiver\workbench-3.1\foundation\x86-win32\bin\tgtsvr.exe" -n vxsim0 -B wdbpipe vxsim0 -V -R C:/ -RW -Bt 3 -A

            When I did the above steps then
            Wind river debug mode -> target connecttion was ruuing and i am using "wdprpc".

            I have checked in your TDP, I found in execution section

            if( defined $Ini{HOST_SPT} ) {
            rename($Ini{HOST_SPT},$out);
            return 1 unless(-s $out);
            }

            I was not able to find the value key of “HOST_SPT” and where it shall be declared.

            Information:
            1. Using RTRT 2003 version
            2. Wind river work bench 6.4.1.2 version

            Please help me on this regards. Many thanks for your valuable support.
            • richard.france
              richard.france
              814 Posts
              ACCEPTED ANSWER

              Re: Data retrieval is not working in TARGET-HOST setup

              ‏2013-01-29T08:34:44Z  in response to SystemAdmin
              here you are the rtrtWtx3.exe
              • SystemAdmin
                SystemAdmin
                2260 Posts
                ACCEPTED ANSWER

                Re: Data retrieval is not working in TARGET-HOST setup

                ‏2013-01-29T10:11:36Z  in response to richard.france
                Richard thanks for your great support.

                I did all the steps and i was able to connect target server nicely with out any problem.

                when rtrtWts3.exe was executing then i faced problem like wtxapi41.dll not found. I have checked in folder "foundation/HOST_TYPE/bin" and there it is not present so searched all directives but i could not able to find this file.

                Can you please provide me the "wtxapi41.dll" ? I think only this problem which is supporting toget the coverage report.

                Thanks once again for your great support.
                • richard.france
                  richard.france
                  814 Posts
                  ACCEPTED ANSWER

                  Re: Data retrieval is not working in TARGET-HOST setup

                  ‏2013-01-29T12:14:19Z  in response to SystemAdmin
                  wtxapi41.dll is part of the VxWorks delivery. It should be located into C:\WindRiver\workbench-3.x\foundation\x86-win32\bin
                  since this file is also used by the VxWorks WorkBench debugger you should have it. Make sur your path allows to access it.
                  You may have wtxapi*.dll for an older version. In this case You may have to use rtrtWtx2.exe instead.
                  • SystemAdmin
                    SystemAdmin
                    2260 Posts
                    ACCEPTED ANSWER

                    Re: Data retrieval is not working in TARGET-HOST setup

                    ‏2013-01-29T13:44:25Z  in response to richard.france
                    Richard you are right. I have set the path " C:\WindRiver\workbench-3.x\foundation\x86-win32\bin" correctly but in VxWorks delivery i got wtxapi42.dll. I tried to modify the name "wtxapi42.dl" to "wtxapi41.dl" and then it rtrtWtx3.exe was invoking but it is giving below error

                    unable to load <cdiabvxppc/vxWorks> because
                    LOADER_ILLEGAL_FLAGS_COMBINATION
                    unloading objects in reverse order
                    unable to unload cdiabvxppc/vxWorks
                    ctrl+C to terminate

                    I think i can not modify the name since i modified the name of wtxapi42.dll to wtxapi41.dll the above error was throughing. Can it possible to get or modify "rtrtWtx3.exe" which will support "wtxapi42.dll" .
                    • SystemAdmin
                      SystemAdmin
                      2260 Posts
                      ACCEPTED ANSWER

                      Re: Data retrieval is not working in TARGET-HOST setup

                      ‏2013-01-30T14:19:01Z  in response to SystemAdmin
                      Richard can you please reply soon, i am waiting for your response. I stuck there only. I guess if i can solve that prob then we have done our with our work.
                      • richard.france
                        richard.france
                        814 Posts
                        ACCEPTED ANSWER

                        Re: Data retrieval is not working in TARGET-HOST setup

                        ‏2013-01-30T17:56:21Z  in response to SystemAdmin
                        if you have the wtxapi42.dll you should also have the wtxapi42.lib located probably into C:\CrossEnv\WindRiver\workbench-3.x\foundation\x86-win32\lib

                        please send it to me as I can try to provide you the rtrtWtx3/4.exe for it
                        • richard.france
                          richard.france
                          814 Posts
                          ACCEPTED ANSWER

                          Re: Data retrieval is not working in TARGET-HOST setup

                          ‏2013-01-30T18:03:12Z  in response to richard.france
                          Ooops
                          I forgot to ask:
                          Do you have a windows Native compiler on your windows machine? like MS Visual Studio 2008 or 2005 or ...
                          • SystemAdmin
                            SystemAdmin
                            2260 Posts
                            ACCEPTED ANSWER

                            Re: Data retrieval is not working in TARGET-HOST setup

                            ‏2013-02-02T15:35:10Z  in response to richard.france
                            Rechard,
                            In my windows machine do not have compiler of Visual Studio 2008 or 2005. But in my machine have visual C# compiler.I am not able to take wtxapi42.dll from my system as per our company policy. I am tring to get it by consulting with concern person in my company. Please provide me rtrtWtx4.exe for me if i will be able to send you the wtxapi42.dll.

                            Thanks for your great support.
                            • richard.france
                              richard.france
                              814 Posts
                              ACCEPTED ANSWER

                              Re: Data retrieval is not working in TARGET-HOST setup

                              ‏2013-02-05T09:14:58Z  in response to SystemAdmin
                              I have updated my VxWorks installation to 3.3 to get the wtxapi42.lib.
                              Now I am able to compile rtrtWtx3 and link with that lib to generate the rtrtWtx342.exe
                              So that rtrtWtx3.exe uses the wtxapi41.dll and rtrtWtx342.exe uses wtxapi42.dll

                              the new rtrtWtx342.exe is attached as zip file.
                              let me now if that works in your environment !!
                              Thanks
                              • SystemAdmin
                                SystemAdmin
                                2260 Posts
                                ACCEPTED ANSWER

                                Re: Data retrieval is not working in TARGET-HOST setup

                                ‏2013-02-08T13:33:03Z  in response to richard.france
                                Hi Richard rtrtWtx342.exe is working fine and i was able to get test report and coverage report.

                                Thank you very much for your valuable support.
                                Richard i wanted to know what are difference in RTRT version 2003 and 7.5.0.1. Please can you send me difference between above said version of RTRT.
                                Thank you very much for your unforgettable support.
                                • richard.france
                                  richard.france
                                  814 Posts
                                  ACCEPTED ANSWER

                                  Re: Data retrieval is not working in TARGET-HOST setup

                                  ‏2013-04-05T20:39:12Z  in response to SystemAdmin
                                  if you install the latest releases you have access to all release notes that provide bug fixes.
                                  I cannot provide this on the forum. but you can contact the support to get this documentation.