添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

Thanks for publishing this, it's gonna be useful for me!

However, a dependency seems to be missing from the pip module:

0 $ sudo pip3 install canprog
Collecting canprog
  Downloading canprog-0.1.0a2-py3-none-any.whl
Collecting intelhex (from canprog)
  Downloading intelhex-2.1-py2.py3-none-any.whl (46kB)
    100% |████████████████████████████████| 51kB 2.3MB/s
Installing collected packages: intelhex, canprog
Successfully installed canprog-0.1.0a2 intelhex-2.1
0 $ canprog -h
Traceback (most recent call last):
  File "/usr/local/bin/canprog", line 7, in <module>
    from canprog.main import main
  File "/usr/local/lib/python3.5/dist-packages/canprog/main.py", line 28, in <module>
    import can
ImportError: No module named 'can'
          

For other people hitting this: The missing dependency is python-can, you can install it on Debian through

$ sudo apt install python3-can

Then canprog seems to work:

$ canprog -h
usage: canprog [-h] [--verbose] [--version] [-n NAME] [-i {socketcan}]
               [-f {hex,bin}]
               {stm32} ...
Command-line tool to flashing devices by CAN-BUS.
others:
  -h, --help      show this help message and exit
  --verbose       enable verbose output
  --version       show program's version number and exit
configuration:
  -n NAME         interface name (default: slcan0)
  -i {socketcan}  interface type (default: socketcan)
  -f {hex,bin}    file format (default: hex)
protocols:
  {stm32}
    stm32         STM32 ROM bootloader