Page 1 of 1

Can't erase the firmware on Printrboard rev.D (solved)

PostPosted: 2013-Aug-Thu-21-Aug
by Tdeagan
I'm trying to flash my Printrboard with the new Marlin unified firmware. I'm on a linux box and have failed trying either of two methods.

First I verify through lsusb that I'm seeing the board in boot loader mode:
Code: Select all
Bus 005 Device 038: ID 03eb:2ffb Atmel Corp. at90usb AVR DFU bootloader


1. From Binary: http://reprap.org/wiki/Printrboard:
I run
Code: Select all
sudo dfu-programmer at90usb1286 erase
which doesn't complain.
I run
Code: Select all
sudo dfu-programmer at90usb1286 flash /home/knoppix/PROJECTS/printrbot/PRINTRBOT_FIRMWARE/Marlin-unified-v2.hex
which tells me :
Code: Select all
Validating...
Flash did not validate. Did you erase first?


2. From Source: Printrbot Firmware Guide
I downloaded from github and setup the Teensyduino app to work with my arduino install. I use the Teensy++2.0 board (per instructions) and compile.
Code: Select all
Binary sketch size: 114,694 bytes (of a 130,048 byte maximum)

Response:
Code: Select all
11:44:34 AM: remote connection opened
11:44:34 AM: remote cmd: "comment: Teensyduino 1.15 - LINUX32"
11:44:34 AM: remote cmd: "dir:/tmp/build5028068786201255892.tmp/"
11:44:34 AM: remote cmd: "file:Marlin.cpp.hex"
11:44:34 AM: File "Marlin.cpp.hex". 115390 bytes, 179% used
11:44:34 AM: File contains data beyond chip size, yikes!
11:44:34 AM: remote cmd: "status"
11:44:34 AM: status data sent
11:44:34 AM: remote connection closed



I also tried it on a windows 7 machine loading the Atmel Flip app and following all instructions in the Printrbot Firmware guide.
All I get is:
Code: Select all
Blank check fail at 0x00000


After all of these, if I replace the BOOT jumper (it's a rev. D,) I can connect in Repetier or Pronterface and it's the old firmware.

No matter how many ways I try it, I can't get the firmware to erase.

I really want to get my Extrudrboard and LCD working and not go back to the RAMPS 1.4, so any help appreciated!!
--tim

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Fri-21-Aug
by Tdeagan
This looks to be the same problem as described in this thread http://www.printrbottalk.com/forum/viewtopic.php?f=19&t=2928.

I hope I don't have to buy a special programmer, but that may be what's next.

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Sat-01-Aug
by ei8htohms
On the Rev. D board you have to install a boot jumper (I use an alligator clip actually) to get into bootloader mode. Then remove it and reset when done.

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Sat-01-Aug
by Tdeagan
Thanks,
I've had no problem getting into Bootloader mode. I verify with: Bus 005 Device 038: ID 03eb:2ffb Atmel Corp. at90usb AVR DFU bootloader from lsusb per docs. My problem is that the lock bits are set. But I've finally gotten the new firmware burned onto my Bus Pirate to let it talk to avrdude, so I should be able to clear them soon!!

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Sat-07-Aug
by ei8htohms
Glad to hear it. So when you said above "When I replace the BOOT jumper...", did you mean "remove.."? Just trying to clarify that our Rev D boards are the same in this regard. Thanks!

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Sat-12-Aug
by Tdeagan
For the Rev. D, the normal operation mode is no jumper. To enter BootLoader, a jumper is placed across the two pins. This is the opposite of all prior boards and causes no end to the amount of documentation grief. It's pretty straightforward in Linux to see the difference with lsusb (Response reads VOTI when in normal operation.) In windows, Flip just wont connect.

I'm struggling with determining how to clear the lock bits, I see lots of docs on how to clear fuses prior to installing a new bootloader. I'm not sure at all that this is the same thing.

Re: Can't erase the firmware on Printrboard rev.D

PostPosted: 2013-Aug-Sat-16-Aug
by Tdeagan
Wow. After 25+ hours of working at this, it appears that I've burned new firmware.
I had to use my (phenomenal) Bus Pirate as an AVR programmer. Which was, of course, the new V4 Bus Pirate and needed a firmware upgrade to do avr programming.

this unlocked the chip:
Code: Select all
avrdude -c buspirate -P com16 -p at90usb1286 -e -U lfuse:w:0xDE:m -U hfuse:w:0x9B:m -U efuse:w:0xF0:m


this burned a new boot loader:
Code: Select all
avrdude -c buspirate -P com16 -p at90usb1286 -U flash:w:BootloaderDFU.hex:i

which I got from http://blog.lincomatic.com/?p=548

Then I used Atmel Flip to burn a copy I compiled from source of the new Marlin firmware. I changed line 39 in language.h to
Code: Select all
#define MACHINE_NAME "Mendel-P"

to help me identify it with M115 (since I couldn't figure out how to get the recommended change:
Code: Select all
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(tdeagan, Printrbot firmware)" // Who made the changes.

to display in Pronterface or Repetier-Host.

After getting the board out of bootloader mode, this all came up fine and I saw my changed machine name in Pronterface.

Bad news is that I still can't get the LCD or Extrudrboard to work. When I plug either in, the system crashes and disappears as a com port. I've been careful on cable connections and I've got a second good power supply hooked up to the Extrudrboard.

Sigh.