How to Upload Firmware HEX to Max v3

The new for 2016 RostockMAX v3!
Post Reply
User avatar
briankb
Printmaster!
Posts: 106
Joined: Thu Jun 13, 2013 11:50 am
Location: North Florida - USA
Contact:

How to Upload Firmware HEX to Max v3

Post by briankb »

I have my Rostock Max v3 setup with a Raspberry Pi installed in the top and running OctoPi.

I have tried for the last few hours to figure out how to use avrdude to upload the pre-compiled .HEX files available in the github seemecnc firmware repo but can't get it to work. I'm trying to avoid removing the top and getting hands on with unplugging the raspi so I can use the laptop to upgrade the firmware with arduino ide (which I have done in past).

How can I upload/update my Max v3 firmware from a linux command line?

the serial connected to it is /dev/ttyACM0 according to the OctoPi serial connection which works.
- CNC's: Rostock Max upgraded to v3.2, Prusa i3 MK3 MMU, Formlabs Form SLA, Shapeoko3 CNC, Palette+, Palette 2 Pro
- Software: Fusion 360, SpaceClaim Engineer, Simplify3D, Repetier Firmware & Host, VCarve Pro
WZ9V
Printmaster!
Posts: 65
Joined: Sat Jan 25, 2014 8:49 pm

Re: How to Upload Firmware HEX to Max v3

Post by WZ9V »

I can't remember the exact command line but install the avrdude package and run it from the command line.

Here is a tutorial that should help

https://learn.sparkfun.com/tutorials/po ... ng-avrdude
User avatar
briankb
Printmaster!
Posts: 106
Joined: Thu Jun 13, 2013 11:50 am
Location: North Florida - USA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by briankb »

Thanks but I need specific advice or commands to use.

I have already googled and even read the link you are suggesting a few hours ago.

It is using -c usbtiny which is not right since the octopi is connecting via ttyACM0 (yes it's usb but it is virtualized serial port I think).

I can't find anything specific about connecting and uploading to the Rambo board via avrdude.
- CNC's: Rostock Max upgraded to v3.2, Prusa i3 MK3 MMU, Formlabs Form SLA, Shapeoko3 CNC, Palette+, Palette 2 Pro
- Software: Fusion 360, SpaceClaim Engineer, Simplify3D, Repetier Firmware & Host, VCarve Pro
WZ9V
Printmaster!
Posts: 65
Joined: Sat Jan 25, 2014 8:49 pm

Re: How to Upload Firmware HEX to Max v3

Post by WZ9V »

Here is what the Arduino 1.6.0 IDE issues to do an upload.

/opt/arduino-1.6.0/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/build192479044862671788.tmp/Repetier.cpp.hex:i

I think if you fix the install directories to what you have and change the part in bold to the file name of the hex file you have you should be good to go.

Once I have my OctoPi up and running I'll know the actual command because I don't want to have to open up the printer in order to update the firmware on the RAMBO.
User avatar
briankb
Printmaster!
Posts: 106
Joined: Thu Jun 13, 2013 11:50 am
Location: North Florida - USA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by briankb »

WZ9V wrote:Here is what the Arduino 1.6.0 IDE issues to do an upload.
genius! I didn't even think to look and see what they were using. trying it now, once I locate where all the files are on this octopi install.
- CNC's: Rostock Max upgraded to v3.2, Prusa i3 MK3 MMU, Formlabs Form SLA, Shapeoko3 CNC, Palette+, Palette 2 Pro
- Software: Fusion 360, SpaceClaim Engineer, Simplify3D, Repetier Firmware & Host, VCarve Pro
User avatar
briankb
Printmaster!
Posts: 106
Joined: Thu Jun 13, 2013 11:50 am
Location: North Florida - USA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by briankb »

I got it to work, here is how I did it and I'm sure these steps could be reduced or the process done better but this is how I did it.

using PuTTY I logged into the Raspberry Pi 2 that is mounted in the top of my Rostock Max v3.

Verified the serial port it was using from the connection that was successful in OctiPi, in my case it is

Code: Select all

/dev/ttyACM0


I created a new folder to keep things tidy in this case I created a new folder in the home/root folder "firmware".

Note: you could git clone both the arduino and seemecnc firmware repos but I only need a few files and just used wget to download the RAW version of the various files which are:

Arduino avrdude.conf

Code: Select all

wget https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/bootloaders/gemma/avrdude.conf
SeeMeCNC Rocstock Max 3 Firmware HEX

Code: Select all

wget https://raw.githubusercontent.com/seemecnc/Firmware/master/Repetier%20Firmware/rostockv3.hex
notice I'm using the RAW version of that file stored in github, the RAW gives you the actual text of the file and wget will create a new file with the contents of the URL you supply.

first I did a test connection using

Code: Select all

avrdude -C avrdude.conf -v -p atmega2560 -c wiring -P /dev/ttyACM0 -b 115200
Which gave me a terminal to the arduino (rambo) board. then ctrl-c to break out of the terminal

Success! So I know I can at least talk to the Rambo board connected to the raspi (raspberry pi)

Once I had a good connection I added the .hex file

Code: Select all

avrdude -C avrdude.conf -p m2560 -c wiring -P /dev/ttyACM0 -U flash:w:rostockv3.hex:i -D
Screenshot of Successful Upload of Hex to Max3
Screenshot of Successful Upload of Hex to Max3
- CNC's: Rostock Max upgraded to v3.2, Prusa i3 MK3 MMU, Formlabs Form SLA, Shapeoko3 CNC, Palette+, Palette 2 Pro
- Software: Fusion 360, SpaceClaim Engineer, Simplify3D, Repetier Firmware & Host, VCarve Pro
geneb
ULTIMATE 3D JEDI
Posts: 5362
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by geneb »

Why go to all that effort when uploading the code via the IDE does the job?

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
briankb
Printmaster!
Posts: 106
Joined: Thu Jun 13, 2013 11:50 am
Location: North Florida - USA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by briankb »

geneb wrote:Why go to all that effort when uploading the code via the IDE does the job?

g.
Do you mean from the Arduino IDE or from the LCD on the max?

if from Arduino IDE (Win/Mac)?

it's because the raspberry pi is installed in the top of the max 3 and to use my laptop or Arduino IDE I have to
  1. Move the Max from it's location on a shelf
  2. Remove the top to access electronics
  3. Disconnect Rambo from Raspi
  4. Connect Laptop to Rambo
  5. Upload the new firmware from source
  6. reverse step 4
  7. reverse step 3
  8. reverse step 2
  9. reverse step 1
Now that I have it setup and configured. I can just grab the pre-compiled .hex from repo and upload it from a SSH client session.

Is it possible to update the firmware on from the LCD using only the hex file?
- CNC's: Rostock Max upgraded to v3.2, Prusa i3 MK3 MMU, Formlabs Form SLA, Shapeoko3 CNC, Palette+, Palette 2 Pro
- Software: Fusion 360, SpaceClaim Engineer, Simplify3D, Repetier Firmware & Host, VCarve Pro
ROvermeyer
Plasticator
Posts: 14
Joined: Sat Sep 10, 2016 11:14 pm

Re: How to Upload Firmware HEX to Max v3

Post by ROvermeyer »

Brian,

I installed Pixel on the Pi using his procedure:
https://www.raspberrypi.org/forums/view ... 6&t=133691

Then I installed XRDP using this procedure:
http://elinux.org/RPi_XRDP_Server

Now you can use Remote Desktop from a windows machine and run the Arduino IDE GUI to install firmware.
WZ9V
Printmaster!
Posts: 65
Joined: Sat Jan 25, 2014 8:49 pm

Re: How to Upload Firmware HEX to Max v3

Post by WZ9V »

Thanks for the OctoPi summary. At some point I need to set that up also. Right now I'm still under construction but once I button it up I'll need to work through the OctoPi.
geneb
ULTIMATE 3D JEDI
Posts: 5362
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: How to Upload Firmware HEX to Max v3

Post by geneb »

Well like the gent said, if you've got the Pi installed, you can RDP into it and upload using the IDE. :)

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
WZ9V
Printmaster!
Posts: 65
Joined: Sat Jan 25, 2014 8:49 pm

Re: How to Upload Firmware HEX to Max v3

Post by WZ9V »

Installing a whole GUI just to run the IDE seems far more excessive in my opinion.
Post Reply

Return to “RostockMAX v3”