marcinbor85 / can-prog Goto Github PK
View Code? Open in Web Editor NEWCommand-line tool to flashing devices by CAN-BUS
License: MIT License
Command-line tool to flashing devices by CAN-BUS
License: MIT License
What brands/types/etc of USB adapters are known to work? Any Amazon or eBay URLs?
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'
1 $
Attempting to use any example command lines, I consistently get the following output error.
File "/usr/local/bin/canprog", line 11, in <module> load_entry_point('canprog==0.2.1', 'console_scripts', 'canprog')() File "/usr/local/lib/python2.7/dist-packages/canprog/main.py", line 215, in main protocol = protocol_class(iface) File "/usr/local/lib/python2.7/dist-packages/canprog/protocols/stm32.py", line 122, in __init__ super().__init__(*args, **kwargs) TypeError: super() takes at least 1 argument (0 given)
I am experiencing an issue when writing to the device :
root@beaglebone:~/arm# ./canbin.sh
[21:09:03.614] main INFO: Connecting target
[21:09:03.621] stm32 INFO: Bootloader initialized
[21:09:03.642] stm32 INFO: Bootloader version: 2.0
[21:09:03.651] stm32 INFO: Read protection: 0x0000
[21:09:03.665] stm32 INFO: Chip ID: 0x0418 - STM32F105xx/107xx
[21:09:03.667] main INFO: Connected
[21:09:03.955] main INFO: Writing memory at 0x08000000:15940
[21:09:03.958] stm32 INFO: Progress: 0%
[21:09:05.181] main ERROR: Writing error: Receiving timeout
While reading doesn't have any issues :
root@beaglebone:~/arm# ./canread.sh
[21:16:03.951] main INFO: Connecting target
[21:16:03.959] stm32 INFO: Bootloader initialized
[21:16:03.981] stm32 INFO: Bootloader version: 2.0
[21:16:03.990] stm32 INFO: Read protection: 0x0000
[21:16:04.003] stm32 INFO: Chip ID: 0x0418 - STM32F105xx/107xx
[21:16:04.006] main INFO: Connected
[21:16:04.007] main INFO: Reading memory at 0x08000000:512
[21:16:04.009] stm32 INFO: Progress: 0%
[21:16:04.092] stm32 INFO: Progress: 50%
[21:16:04.137] stm32 INFO: Progress: 100%
[21:16:04.140] main INFO: Successful
[21:16:04.164] main INFO: Disconnecting target
[21:16:04.166] main INFO: Disconnected
canprog seems to be incompatible with newer versions of python-can.
Using the latest version of python-can yields various runtime errors.
I resolved the issues by downgrading to python-can version 2.2.1.
pip install --force-reinstall -v python-can==2.2.1
Thanks again for can-prog! I am scripting around can-prog right now and noticed that it exits with code zero even if the operation has failed:
# canprog -i socketcan -n can0 stm32 write fw.dump ; echo $?
[10:13:40.770] main INFO: Connecting target
[10:13:41.770] main ERROR: Connecting error: Receiving timeout
0
I'd suggest exiting with code 1 if the operation fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.