Closed zamora18 closed 6 years ago
i have the same problem..... at last..... when is happened i execute 'os.system("start cmd /c JLinkSTM32.exe -SetDeviceFamily 2")' i know this is not a good way to connect the device...
For me this looks like an implementation issue in the JLink-Programmer interface. There should be no need to execute data for communicating via USB-port. Esp. the example @wxd9199 posted shows that this is caused by JLink.
I can not tell you why it works in PyCharm but not hen bundled. But I can not see how this is releated to PyInstaller. Thus I'm closing this.
@wxd9199 I have tried your "fix" but it is still not working for me. What determines the SetDeviceFamily
parameter? I am using a J-Link Plus programmer. Are you executing this after the exception is caught? It works in a bundled GUI?
How do I solve it?
There seems to be no problem in using py2exe.
Hello,
I have created a GUI (using PyQt4) that uses a 3rd party library pylink. This library allows me to flash firmware onto an STM micro-controller using a J-Link Programmer connected through USB to my computer. The program works great when developing in my IDE (PyCharm), but after bundling the GUI in an executable (using pyinstaller) I get this error (with varying locations 0x00____ ):
WindowsError: exception: access violation writing 0x000000CE00000000
This is the full error output:
I have no problem accessing the 3rd party library, so I am fairly confident that I packaged the executable correctly and that the dll was loaded successfully.
After having done some research I believe that the problem is that it is being denied access to memory because the bundled .exe has DEP (Data Execution Prevention) protection. (See this article).
I searched the pyinstaller FAQ and email list but did not find anything that helped me in regards to disabling DEP from pyinstaller. I also attempted to turn off DEP in Windows for my specific application, but I cannot set DEP on 64-bit executables.
I have done a fair amount of testing and review, and when debugging I do not receive any relevant debug messages in the console when the code is executed.
More information on my setup:
Thank you for your help.