Why can't I flash firmware via pi zero w?
per
And confirmed by my experimentation, flashing firmware from the pi zero doesn't work. Anyone know why? Is there a workaround?
RE: Why can't I flash firmware via pi zero w?
It's broken? lol. I think there's a thread on Github, something to do with UARTs not behaving.
RE: Why can't I flash firmware via pi zero w?
I imagine it's the lack of handshaking lines (native) on the Pi GPIO uart. We solved this for Alamode (an arduinoish add on board for rPi) by using one of the other GPIO pins and routing it to reset. We then had to modify AVRDude to use that pin for reset of the arduino for bootloading.
I think the current version of AVRdude has some support for arbitrary reset pin assignment.
To support this on the Mk3/S you would have to route one of the GPIO pins on the pi connector to reset on the einsy. You could do this with a blue wire, or respin the einsy. (If someone could point me to the design files for the Einsy variant used in the Mk3s, I can take a look.) If this is already done, the firmware update could indeed be done with some changes to the AVRDude commands for loading firmware.
RE: Why can't I flash firmware via pi zero w?
looks like the ultimachine folks had a different idea, and mapped ICSP (In Circuit Serial Programming) to the header. I'll have to look into "bit banging" or native SPI use on the pi.
RE: Why can't I flash firmware via pi zero w?
Yep, I believe it's the USB handling ATMega8u2 on the Einsy that does the ISP programming of the ATMega2560. So a RPi3, when connected over USB can program the Einsy via the 8u2. The RPi Zero doesn't connect to the 8u2, it connects directly to the 2560 serial port. As such, it can't program it.
Doing the ISP straight from the RPi Zero on other pins (if they're connected right) looks like the right approach.
RE: Why can't I flash firmware via pi zero w?
Thanks everyone for the information. I've since ditched the zero after realizing that it doesn't have enough power to even run a print properly.
So I wanted to wire in a pi 3B to the einsy pins but after reading this thread it sounds like that won't be able to flash firmware either? Am I understanding correctly?
RE: Why can't I flash firmware via pi zero w?
You will be able to flash using eg. avrdude if you connect the 3B to the USB port of the Einsy via a USB cable.
(You can then also print over the USB or you can print straight to serial if you connect the pin headers, whatever you like.)