I\'ve been working on an embedded C/C++ project recently using the shell in Tornado 2 as a way of debugging what\'s going on in our kit. The only problem with this approach
here is another potential way:
-> saveFd = open("myfile.txt",0x102, 0777 ) -> oldFd = ioGlobalStdGet(1) -> ioGlobalStdSet(1, saveFd) -> runmytest() ... -> ioGlobalStdSet(1, oldFd)
this will redirect all stdout activity to the file you opened. You might have to play around with the file name of the open to make it write on the host (e.g. use "host:/myfile.txt" or something like this)
I am making the assumption that you are using the host shell to perform this.
If you are running a test by launching it from the shell like "runTest()", you can use the redirection operator (>) to send the output of that function to a text file on your host machine.
> runTest() > mytestResults.txt
This will save any output that runTest generates to the file mytestResults.txt
If you would like to capture everything on the screen all the time, I will have to dig more into this.
rlogin vxWorks-target | tee redirected-output.txt
The host shell has a recording capability built in. There are 3 environment variables available (in 6.x - not available in 5.x):
RECORD (on/off) : Controls recording of the shell
RECORD_TYPE (input/output/all): Determines what you will be recording
RECORD_FILE : Filename to save things to.
you use the ?shConfig command to configure the shell environment variable. ?shConfig by itself displays the variables. Here is how I set mine up:
-> ?shConfig
...
RECORD = off
RECORD_FILE = C:/test.txt
RECORD_TYPE = output
...
-> ?shConfig RECORD_TYPE all
-> ?shConfig RECORD_FILE myData.txt
-> ?shConfig RECORD on
Started recording commands in 'myData.txt'.