-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No output from Execute script #3
Comments
I don't reproduce this issue. Which Windows version & language are you using ? |
@jfdelnero this is on Windows 10 using VC++ I only have Visual Studio 2017 and had to retarget the project for the newer SDK version so this may be the cause. The VC6 code also suffered the same problem but it too had to retarget and would only run in release mode (not debug) due to other errors caused by the retarget. I'll freshly clone the project and try to source the older SDK and see if that helps and close the issue accordingly. |
I am also not able to get Execute script to work. However, on my machine, when I attempt to execute a sample script, then the application crashes. If I attempt to run it from Visual Studio, then it throws an exception but does not tell me where in the code it crashes. The exception when running from within Visual Studio is My script is very simple and is below. I was just trying to figure out what each statement does. print ---------------------------- jtag_push_pop pause 5000 |
So, I believe I may have more info on the crash. Running it in the debugger again, it got the exception on line 187 of JTAGBoundaryScanner.c Unhandled exception at 0xFCE9B530 in JTAGBoundaryScanner.exe: 0xE0464645 (parameters: 0x80070006, 0x80070006). However, I can seem to prevent the crash by changing the line endings of the script file from DOS line endings to UNIX line endings. After making that change to the small sample script file, then the program does not crash. I get a small console type black window that appears briefly and then goes away. |
By adding some breakpoints, I found that the console windows when briefly created would contain no text output. Goggling the symptoms and the Visual Studio version, I found that I had to make the following additions.
Without the additions in step3, the created console window would not close after adding the stuff from step 2. In void openconsole(), I found that the handle_out and handle_in were not required on my system once I added the freopen_s calls. It seems to be able to access printf and getchar without the handles. Unsure of the side effects of any of these changes. It works on one machine with a very limited test case. However, I was at least able to run a script, see the output and then close that console window. |
@mrburns42 are you able to fork the repository so I can test your changes on my setup? It seems that different VS versions exhibit different symptoms! |
@mrburns42 Thanks for the tests and the patch, i will test it and merge it. I confirm that i can reproduce the console issues with recent VS. I think that the proper way to definitively solve this issue is just to remove this console and use a proper window for this. |
An update on the line endings of the script. The DOS vs UNIX is a red herring. While switching between them made a difference in the crash, the reason has something to do with the console window not being configured properly in the more recent VS. Once I added those few lines to the code, then it accepted both DOS and UNIX line endings. If a different window is opened rather than a console, I would suggest that some option be added to save the contents of that new window. That way the results of running the script could be easily documented. Thank you for this great open source project. |
When using the execute script option, the target device pin states change but nothing is displayed in the console output window that pops up. Example script:
The text was updated successfully, but these errors were encountered: