Firmware Updating for Windows explained

Code hacking talk

Firmware Updating for Windows explained

Postby RetireeJay » 2014-Feb-Mon-15-Feb

I had posted a lengthy article about updating Printrboard firmware in the Printrbottalk Wiki.
http://www.printrbottalk.com/wiki/index.php?title=Firmware_Update But it seems that the Wiki is probably gone and will never come back (unless someone with php expertise takes pity on us).

EDIT: while the Wiki is down (since June or July 2015), I have posted a fairly recent (but not absolutely up-to-date) copy of the material I wrote for the Wiki as an attachment to this posting. The formatting is rather arcane because it's meant to be "interpreted" by the Wiki software and presented on your screen in a much nicer format. If the original article gets completely and irretrievably lost, I'll re-format the article so it looks better on your screen.

This article collects together the accumulated wisdom of dozens of posts. I am totally indebted to PxT and others who helped me through the laborious process of learning to compile and flash my own firmware. Unlike a long chain of Forum posts, this article attempts to explain everything in one place.

You didn't know there was a Printrbottalk Wiki? It's easy to find; just click on this icon in the upper right of your screen.
WikiButton.PNG


If you go that route instead of using the direct link, click on the Main Menu's "Firmware Update." Or you can Search for "Firmware Update"

By the way, for the curious, Marmil has posted links to explanations of G-code here:
http://www.printrbottalk.com/wiki/index.php?title=User:Marmil
It seems that this information is getting updated frequently, so Automated Bed Leveling is included. :)
  • 1

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3
User avatar
RetireeJay
My next printer is...
 
Posts: 4944
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 496

Firmware Updating for Windows explained

Sponsor

Sponsor
 

Re: Firmware Updating for Windows explained

Postby 2Gringos » 2014-Feb-Mon-15-Feb

I tried this today. When I load the device driver from Flip, it is showing up in my Device Manager as AT32UC3A. When I then open Flip, that device is not listed for selection and if I select anything else I can get the message that the 'Could not open device message'. Do I need an updated driver? Thank you for any help or suggestions.
  • 0

2Gringos
Waiting for extruder temp...
 
Posts: 82
Joined: 2013-Feb-Wed-13-Feb
Reputation: 0

Re: Firmware Updating for Windows explained

Postby RetireeJay » 2014-Feb-Mon-16-Feb

You should be seeing and selecting AT90USB1286..

In the Flip program help screen, open the "Flip User's Manual" and then the "USB Driver Installation"

EDIT: Of course the phrase "Reset the Target Hardware" means to install the jumper (Rev D board) and press the reset switch.

Flip USB Driver Help Page.PNG
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3
User avatar
RetireeJay
My next printer is...
 
Posts: 4944
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 496

Re: Firmware Updating for Windows explained

Postby bres55 » 2014-May-Tue-16-May

Thank you for taking the time to put together the excelent document on Firmware Updating on Wiki
Within it you mention, under
HOW TO EDIT AND COMPILE, PREPARING A HEX VERSION
Using the Tools menu, select the target Board. A long list will open up; select an entry that includes the word “Printrboard” (and if more than one Printrboard choice is presented, don’t use one mentioning the CDC bootloader).

In PxTs
Printrbot Firmware.pdf
It is stated
Launch your installed version of Arduino and choose “[BootloaderCDC]Teensylu/Printrboard” from the Tools→Board menu.

I'm just starting at the bottom of this mountain! If you could clarify this for me I'd be grateful.
  • 0

bres55
I'm an end stop.
 
Posts: 50
Joined: 2014-Mar-Tue-18-Mar
Location: Folkestone, UK.
Reputation: 1

Re: Firmware Updating for Windows explained

Postby RetireeJay » 2014-May-Tue-16-May

PxT - can you explain?

I thought that the CDC bootloader was not capable of using all the memory in the Printrboard - and we need the memory - so the actual bootloader is DFU. Would that somehow be different when programming from a Mac?? I thought this was resident on the Printrboard and independent of what kind of computer you are using. But I know you use Macs.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3
User avatar
RetireeJay
My next printer is...
 
Posts: 4944
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 496

Re: Firmware Updating for Windows explained

Postby PxT » 2014-May-Tue-22-May

Within Arduino, and for our purposes specifically, the difference is negligible. While the two choices don't produce exactly the same .hex file they differ by only a half-dozen or so bytes in one line.

Bear in mind that you're not actually selecting one boot loader over another -- official printrboards always have DFU -- but rather changing some build-time parameters. Omitting the lines that are identical between the two they are defined as follows:

usbtinyisp
Code: Select all
utteensylu.upload.using=usbtinyisp
utteensylu.upload.maximum_size=131072


BootloaderCDC
Code: Select all
cdcteensylu.upload.protocol=avr109
cdcteensylu.upload.maximum_size=130048
cdcteensylu.upload.speed=115200


As you can see the only differences are upload definitions and maximum size. Since we don't use Arduino's built-in uploader I believe that part is irrelevant leaving only the maximum_size variable that is different between the two. As long as you are not running up against that size limit I don't think there is any practical difference.
  • 1

User avatar
PxT
Print complete...
 
Posts: 1339
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: Firmware Updating for Windows explained

Postby biglazyb11 » 2014-Dec-Wed-08-Dec

Hello,
First a great thank you to posters that help resolve problems, particularly RetireeJay. You have helped me so many times, but this is the first time I am truly stumped so I registered and here we go:

I have a Printrbot Jr V2. I replaced the original Printrboard with a Rev. E -- 6 months ago or so I followed all the instructions on this board and others to flash the firmware using a laptop running Win 8.1 and a USBtiny to upload with FLIP 3.4.7 -- I rebuilt the print area to be more than a cubic foot -- 6 months of printing glory!

Suddenly in the middle of the print last weekend, everything froze up. I can still connect with Repetier however my x axis movement is messed up (other axes and extruder work fine, but x will not move at all for some prints, leaving me with very skinny 3D prints! I replaced the x motor (it is now moving a very large bed), but the new motor had the same issues).

Not knowing if I torched my second Printrboard I went to flash the firmware. I followed all the steps I used previously, generating the hex file and moving it to a place where I can find it. I have all the arduino hassles figured out, thanks to this forum. I am at the last mile here uploading the hex, but I am stumped

I tried using FLIP 3.4.7 that I had installed back in May, but I keep getting the "Could not open USB device" error when trying to connect to my board. I followed my notes from my previous successful re-flash using a USBtiny with the 6-pin connector on the Printrboard but unplugging and plugging in the USBtiny did not work. I simply cannot connect to my Board.

Steps taken to try and remedy this:
delete all the drivers for the USBtiny and download new versions -- including the versions from AVRdude
Change settings in windows 8.1 to allow unsigned drivers
reboot computer after every change
uninstall and re-install FLIP and all the drivers - pointing to C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf
Force Flip to use the AT90USB128 driver version 1.2.2.0 from 2010 (it wants to install as AT32UC3A Version 1.2.2.0)
several iterations of power-up, uplug and replug, jumper and reset, unjumper and reset the board, close FLIP and open FLIP, running as adminstrator, wait for driver installation and then try to connect.

If I plug the TinyUSB in without any other connections to the Printrboard, it shows up in device manager as "Atmel USB Device/AT90USB128". Of course the Printrboard will not reset without another power source and FLIP won't connect in this state. If I plug in the micro USB the computer then recognizes the PrintrBoard and I can reset but the FLIP will not connect. Likewise with the 12V connection. If I unplug the USBtiny while the printrboard has either the micro usb or the 12 power supply and then plug it in again, Windows will not recognize the USBtiny and will give a "USB device not recognized" and will not install as an Atmel device, but only as an "Unknown USB device" and will not allow me to install any drivers from Atmel. If I unplug the power from the board (usb and 12v) and unplug and replug the USBtiny in, everything looks dandy again (device shows up as Atmel USB Device), but of course I cannot connect through FLIP and I am back where I started.

Any ideas? I am comfortable getting into the registry of windows if someone thinks there may be a problem there. Honestly I am stumped - what worked before is not working now, and I don't see any evidence of burned out components on the Printrboard. I can get a new one, but I don't want to scrap this one just because I am bad at USB connections.

Any help would be greatly appreciated.
  • 0

biglazyb11
Waiting to connect to printer...
 
Posts: 9
Joined: 2014-Dec-Wed-07-Dec
Reputation: 0

Re: Firmware Updating for Windows explained

Postby RetireeJay » 2014-Dec-Wed-09-Dec

I don't have the USB tiny hardware, but I imagine that it works quite differently than the direct USB connection to the board. I think that the USB tiny is a "direct connection" to the memory on the board (not requiring the firmware on the CPU chip to be operational at all), whereas the standard USB (micro) connection is a serial communication port that relies on the DFU bootloader in flash memory. So these are two different paradigms.

Maybe FLIP has provisions to work in either mode - or maybe not! I've only used it in serial port mode via the usual micro USB connector on the board. Didn't the USB tiny hardware come with a software to use for uploading data from the computer to the target flash memory on your board?

My suggestion would be to connect the board via the usual USB cable to your computer and power up. Wait for Windows to finish acknowledging the port ("beep") and then go into Device Manager to find out what port your board is on. After all your removals and re-installations, it may be different than what you had originally. And although FLIP and Repetier make an attempt to find the working COM port number, they don't always succeed - so you have to help them out by specifying the correct COM port. (If you don't have a COM port to the board at all, you need to fix that. The "teensy" driver is required for versions of Windows below 8, but maybe W-8 can recognize the Printrboard without the "teensy" driver.)
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3
User avatar
RetireeJay
My next printer is...
 
Posts: 4944
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 496

Re: Firmware Updating for Windows explained

Postby biglazyb11 » 2014-Dec-Thu-07-Dec

Hi RetireeJay,

Thank you for the quick response. I did as you recommended (not sad about not using the USBtiny as pin connections can be scary) -- the reason I was using the tiny is what I have run into, which I repeated this morning.

The PB is connected on COM4 on my computer when hooked up through the normal micro USB. I uninstalled FLIP (checked the registry to make sure anything related to Atmel or Flip was gone), rebooted, plugged in the printrbot and verified I am still on COM4. The device manager lists the connection as "USB Serial (Communication Class, Abstract Control Model) (COM4)" The driver provider is PJRC-dot-COM LLC. I can connect to the board normally, though it is not functioning properly.

I install FLIP and reboot.

I disconnect the USB connection, install the jumper and re-connect it. I hit reset on the PB and hear the familiar disconnect and connect sounds on my machine -- then...nothing. No prompt for driver installation, the device manager still sees the connection as the normal USB Serial on COM4. If I try to force install the Atmel driver on the device the computer tells me it is not compatible, and will not proceed.

I repeat with several iterations of jumper installed, different jumper wires, jumper not installed, unplug and plug, hit reset or don't hit reset -- none of these will get the computer to prompt me for the hardware install that would be indicated by bootloader mode.

Natually FLIP will not connect in this state. I ran into this before breaking out the USBtiny, thinking that for some reason my board will not let me into bootloader mode. Is this indicative of a damaged Printrboard? Again I am on Rev E -- it is an official board though I bought it second hand and it didn't give me any trouble doing this last time. Maybe I should uninstall all the drivers for the PB and start over?

Your help is greatly appreciated if you have some ideas.

Thank you
Brian
  • 0

biglazyb11
Waiting to connect to printer...
 
Posts: 9
Joined: 2014-Dec-Wed-07-Dec
Reputation: 0

Re: Firmware Updating for Windows explained

Postby RetireeJay » 2014-Dec-Thu-09-Dec

biglazyb11 wrote:I disconnect the USB connection, install the jumper and re-connect it. I hit reset on the PB and hear the familiar disconnect and connect sounds on my machine -- then...nothing. No prompt for driver installation, the device manager still sees the connection as the normal USB Serial on COM4


That's perfectly normal, exactly the way mine behaves. The communication between the computer and the Atmel chip has been established. The "bootloader" mode or the "operational" mode are distinguished from each other on a different ISO transport protocol "layer." When using the USB cable connected to the USB port on the board, the communication between your computer and the Atmel chip stays on COM4. The difference between modes is taken care of by software within the Atmel and is entirely invisible to the computer's COM port controller.

biglazyb11 wrote:Natually FLIP will not connect in this state.


No, that's not natural. FLIP should be able to connect to your board through COM4. The fact that you see COM4 in your Device Manager is very good.
BTW, this may or may not have anything to do with your situation, but I was surprised to discover that I need to power up the board (with or without the jumper in place), THEN make sure the jumper is installed, THEN press the reset button. Simply powering up with the jumper in place does not automatically enter bootloader mode (meaning a "reset" is NOT identical to a "power-up").

biglazyb11 wrote:Again I am on Rev E -- it is an official board though I bought it second hand and it didn't give me any trouble doing this last time.


I had heard of Rev E, but I think they are quite rare. Almost everybody seems to have Rev D or Rev F. There were pretty substantial changes made in Rev F, but from what little I know of Rev E it should behave almost exactly the same as Rev D. (versions below Rev D had inverted logic for the boot jumper).
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3
User avatar
RetireeJay
My next printer is...
 
Posts: 4944
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 496

Re: Firmware Updating for Windows explained

Postby Mooselake » 2014-Dec-Thu-10-Dec

Reprap.org lists the Rev E as a non Printrbot release that replaces the FETs with SMT versions. iIIRC (always questionable...) it was an aftermarket supplier and Laine/Printrbot had no connection with it.

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3591
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 172

Re: Firmware Updating for Windows explained

Postby biglazyb11 » 2014-Dec-Thu-23-Dec

Well shoot. It looks like my Rev. E is not official (man, it looks official but I think I bought it from a guy in Denmark). I gave it one last try tonight, Taking RetireeJay's note about 'reset' and 'power down' being different animals. So after each of these I attempted to get FLIP to connect, each time getting the same com.atmel.flip.IspException error "Could not open USB device" :

Power up 12v, connect usb, disconnect usb, install jumper, reconnect usb, hit reset
Power up 12v with jumper installed, connect usb, hit reset
Power up with only the usb providing power, disconnect usb, install jumper, reconnect usb, hit reset
Power up 12v, install jumper, connect usb, hit reset
Power up 12v, install jumper, hit reset, connect usb, hit reset
Power up with only the usb providing power, install jumper, hit reset
Power up with only the usb providing power and jumper installed, hit reset
Power up with only the usb providing power and jumper installed, disconnect usb, reconnect usb, hit reset

I deleted the device and all the drivers from the serial connection, rebooted and installed a fresh serial_install (then verified I can connect to the board in repetier on COM3) and FLIP and repeated the above - no luck. It seems I cannot get my board into bootloader mode.

I wrote all this in here so that someone else that may be having the same problem can see what I tried. Thank you for your responses, and your attempt to help, I will be buying a new (official) board this week.
  • 0

biglazyb11
Waiting to connect to printer...
 
Posts: 9
Joined: 2014-Dec-Wed-07-Dec
Reputation: 0

Re: Firmware Updating for Windows explained

Postby biglazyb11 » 2015-Jul-Tue-20-Jul

Epilogue:

Refurbished Rev. D from Printrbot worked perfect on the first try. Thanks again for all the support -- I am back in business. :D
  • 0



Last bumped by RetireeJay on 2015-Jul-Tue-20-Jul.
biglazyb11
Waiting to connect to printer...
 
Posts: 9
Joined: 2014-Dec-Wed-07-Dec
Reputation: 0


Return to Hack talk

Who is online

Users browsing this forum: No registered users and 1 guest