pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.14k stars 485 forks source link

How to create a pyocd.exe file #1743

Closed King-Jiang closed 2 weeks ago

King-Jiang commented 2 weeks ago

i want to add my probe and replace other pyocd.exe. i don't know how to create exe file

King-Jiang commented 2 weeks ago

https://github.com/pyocd/pyOCD/issues/773#issuecomment-560559736 I follow this step I navigate to the PyOCD folder and issue the command :pyinstaller pyocd.spec

404 INFO: PyInstaller: 6.11.1, contrib hooks: 2024.10 405 INFO: Python: 3.12.4 436 INFO: Platform: Windows-10-10.0.19045-SP0 437 INFO: Python environment: C:\Users\kj\AppData\Local\Programs\Python\Python312 File "C:\Users\kj\AppData\Local\Programs\Python\Python312\Scripts\pyinstaller.exe__main__.py", line 7, in Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\building\build_main.py", line 1252, in main build(specfile, distpath, workpath, clean_build) File "C:\Users\kj\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\building\build_main.py", line 1192, in build exec(code, spec_namespace) File "pyocd.spec", line 61, in raise Exception("failed to find cmsis-pack-manager native library") Exception: failed to find cmsis-pack-manager native library

King-Jiang commented 2 weeks ago

bhttps://github.com/jizai945/pyocd-exe/blob/main/打包教程/run.spec I follow this step and issued the command: pyinstaller run.spec

I get a nice run.exe in the dist folder. I run it to see its version, and that works:

D:pyOCD-0.36.0\dist> .\run.exe -V 0.36.1