TL;DR The utility avrdude-rpi still uses python which may be the issue @bwduncan @TrystanLea. @Martin_Harizanov - I note OEM fork is from you. Went back to the original repo and is still python as well.
In detail…
Interesting.
Start ATmega328 serial upload using avrdude with latest.hex
chmod: cannot access '/var/log/emoncms/firmware.log': No such file or directory
Attempt: 1
avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/opt/openenergymonitor/emonpi/firmware/compiled/latest.hex
Note: progress written to logfile /var/log/emoncms/firmware.log
avrdude-original: Using autoreset DTR on GPIO Pin 7
strace: |autoreset: Broken pipe
ERROR: Not in sync
In your fiddling, have you changed the avrdude setup?
You are missing this message in the log.
avrdude-original: Using autoreset DTR on GPIO Pin 7
There is an extra script inserted to make the reset pin work on an RPi.
Check the links…
pi@emonpi:/opt/emoncms/modules/usefulscripts/octopus $ which avrdude
/usr/bin/avrdude
pi@emonpi:/opt/emoncms/modules/usefulscripts/octopus $ ls -la /usr/bin/avr*
lrwxrwxrwx 1 root root 52 Oct 17 2019 /usr/bin/avrdude -> /opt/openenergymonitor/avrdude-rpi/avrdude-autoreset
-rwxr-xr-x 1 root root 383576 Apr 12 2019 /usr/bin/avrdude-original
pi@emonpi:/opt/emoncms/modules/usefulscripts/octopus $
In simple terms
- calling
avrdude
- calls
dvrdude-autoreset
- calls
/opt/openenergymonitor/avrdude-rpi/autoreset
(the script the generates the message above) - calls
/usr/bin/avrdude-original
At this point I realised that autoreset
is using Python and not Python3 which may be the issue.