Redirecting CrossLoad output

Comments

4 comments

  • Avatar
    Jon Elliott

    I've just tried it here and it is working as I would expect.

    If you're trying to redirect the crossload help screen then the problem is that it is being output on stderr rather than stdout. To redirect stderr you use 2> rather than >

    Regards,

    Jon

    0
    Comment actions Permalink
  • Avatar
    A.J. van de Ven

    Perhaps I'm doing something wrong. This is the command I'm trying to run:

    "C:\Program Files\Rowley Associates Limited\CrossWorks for ARM 2.2\bin\crossload" -target usb -solution "C:\MySolution.hzp" -project MyProject -config "THUMB Flash Release" -loadaddress 0 "C:\MyBinary.bin" > C:\out.txt

    The output appears in the console window, but when the programming process completes, I open the newly created out.txt and it's blank.

    I see the same when I try just running crossload.exe with no parameters, regardless of whether I use one or two > symbols.

    Other console applications, such as running chkdsk /? > out.txt, behaves as I'd expect, redirecting the entire output to the text file and not displaying anything in the console.

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    > I see the same when I try just running crossload.exe with no parameters, regardless of whether I use one or two > symbols.
    No, to redirect stderr, you do:

    crossload 2> err.txt

    '>>' appends stdout to a file.

    See here for more information on redirecting output in Windows.

    0
    Comment actions Permalink
  • Avatar
    A.J. van de Ven

    That was it. I misunderstood your comment regarding 2> and thought you meant "two >" instead of "2>".

    I appreciate your assistance!

    0
    Comment actions Permalink

Please sign in to leave a comment.