Welcome! Log In Create A New Profile

Advanced

OctoPrint and Reflashing Firmware

Posted by SJMaybury 
OctoPrint and Reflashing Firmware
August 06, 2016 12:54PM
I can't seem to find any information on this...
I'm designing a protected, fully insulated "cage" for all my electronics with only the necessary I/O and easy access to internals if needs be. However I don't want to be opening it up to unplug stuff and all that malarkey. So, is it possible to reflash the firmware (Marlin) through the Raspberry Pi (2)?
Re: OctoPrint and Reflashing Firmware
August 06, 2016 01:05PM
It would have been possible apart from the Ardunio software suite is still stuck on 1.0.1 for the Raspberry Pi and I don't think Marlin will compile under this version of Arduino IDE.
Re: OctoPrint and Reflashing Firmware
August 06, 2016 05:18PM
I would keep the Pi and Mega cards in separated enough so that I could unplug the pi and with USB extension cable upload new firmware from laptop.

But if you really want to study this and you have nothing to start, here is my 5 minutes work.

I haven't even tried to use arduino on pi, but on my desktop it feels avr-gcc really likes to use CPU. That said, I would keep the compilation process on real computer with infinite memory and unlimited CPU power.

Arduino must build the hex file somewhere. Search it and copy it to raspberry pi and use avrdude to flash it.
[www.arduino.cc] gives some ideas what to look. Maybe arduino-ide can output more detailed debug output to show what it really does.

My experience with arduino is really limited.

My educated guess is something like below but it needs something more to work.
avrdude -p m2560 -c wiring -P /dev/ttyUSB0

-p m2560 is mega 2560
-c wiring is protocol/burner/whatever to use to upload the binary. Wiring was the first version of high abstraction programming environment which later became known as Arduino.
-P port and /dev/ttyUSB0 is first USB serial port.

Have a look Octoprint plugins. There are some eeprom related plugins, if those use avrdude to program the eeprom, then writing Reflash your arduino plugin would be quite easy if you are familiar with Python.
Sorry, only registered users may post in this forum.

Click here to login