Using STM32_programmer_CLI.exe how can I capture the STD output?
Running in vb.net I can successfully load code to a target using a .bat file using:
System.Diagnostics.Process.Start("c:\rp:\boot.bat")
In the above case a command window is shown during the load with session information. It goes away when complete.
However, if I launch the bat file as a "process" and look for the STD output, I get nothing. However the "process" loads a file correctly.
' define a process
Dim p As New Process
p.StartInfo.FileName = "boot.bat"
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.RedirectStandardError = True
p.StartInfo.CreateNoWindow = True
p.EnableRaisingEvents = True
Application.DoEvents()
' add a handler so we can easily display the data
AddHandler p.OutputDataReceived, AddressOf Showme
p.Start()
p.BeginOutputReadLine()
Application.DoEvents()
' spin here till done or cancel
Do While (p.HasExited = False) And (CANCEL = False)
' monitor progress
Application.DoEvents()
Loop
I never get an event on OutputDataReceived. Does the cli version issue standard output? If not, is there a good workaround?
Thanks!
