Problem flashing hex with avrdude

Post Reply
revspete
Posts: 4
Joined: Tue Feb 05, 2019 11:00 am

Problem flashing hex with avrdude

Post by revspete » Tue Feb 05, 2019 11:37 am

Hi,

Issue: I can not flash a hex file using avrdude from rpi

Setup:
RPI V3 B+
Hardware uart ttyAMA0
I can short Rx Tx on rpi and echo successfully
I can also echo commands successfully to stock firmware on the cnc hat

My procedure to flash:
I used the rpi cnc config files to setup serial and install arduino and avrdude-rpi
Primary scripts I believe are relevant (although I used much of the other scripts also):
https://github.com/Protoneer/RPI-CNC-Co ... Arduino.sh
https://github.com/Protoneer/RPI-CNC-Co ... -Config.sh

I compiled my grb-master to a hex file, then from the same directory performed: sudo PROGRAMMER="-c arduino - P /dev/ttyAMA0" make flash

The console repeatedly spits out "RPI-ATMEGA328" until I kill it. There is no activity light on rpi, no flashing of Rx (or Tx) lights on the CNC hat, if I short the Tx and Rx pins on the RPI there are no messages echoed on the minicom monitor either. I added some debug messages the autoreset328 file and I can see its gets called however it exists every time with an exception.

Another note:
In the autreset file it uses pin 11 - looking at the rpi pinout that is not on the header. Pin 11 (i.e. gpio 11) is actually physical pin 23. I feel this should be changed to GPIO17 (or GPIO4)- but i cant find schematic of the CNC hat so don't know?! Please advise.

Any suggestions on how to proceed would be great!

Thanks,
Peter

Bertus Kruger
Site Admin
Posts: 1461
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Problem flashing hex with avrdude

Post by Bertus Kruger » Sun Feb 10, 2019 6:19 pm

Have a look at this script:

https://github.com/Protoneer/RPI-CNC-Co ... -Latest.sh

Its and example of uploading firmware.

Bertus Kruger
Site Admin
Posts: 1461
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: Problem flashing hex with avrdude

Post by Bertus Kruger » Sun Feb 10, 2019 6:22 pm

revspete wrote:
Tue Feb 05, 2019 11:37 am
Another note:
In the autreset file it uses pin 11 - looking at the rpi pinout that is not on the header. Pin 11 (i.e. gpio 11) is actually physical pin 23. I feel this should be changed to GPIO17 (or GPIO4)- but i cant find schematic of the CNC hat so don't know?! Please advise.
With Python RPI.GPIO , Pin 11 is associated with GPIO17...

Image

revspete
Posts: 4
Joined: Tue Feb 05, 2019 11:00 am

Re: Problem flashing hex with avrdude

Post by revspete » Wed May 22, 2019 7:21 am

Thanks for the reply, I ended up using the provided image with no problems. Will look at the example upload script with my next setup.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests