Welcome! Log In Create A New Profile

Advanced

Firmware flashing

Posted by reprappro 
Firmware flashing
January 15, 2014 11:37AM
I've updated the instructions on Duet firmware flashing, hopefully to make it a bit clearer: [www.reprappro.com]

However, I've removed the 'true' flag from the bossac command, as I have had reports this wasn't working, and was even on the phone to a customer and had to remove it (Windows 7, I think) to get the flash to work. The bossac instruction page also doesn't mention it, either: [www.shumatech.com]

I changed it from (Windows command):
bossac --port=COM4 -U true -e -w -v -b RepRapFirmware-XXX-DD-MM-YYYY.bin -R
to
bossac --port=COM4 -U -e -w -v -b RepRapFirmware-XXX-DD-MM-YYYY.bin -R

I don't seem to have problems leaving 'true' in on Ubuntu, but then I haven't tried without; can anyone/someone test if it is necessary/not necessary on their OS? Please say what OS you have.

We are looking at ways to make the firmware updating easier. Unfortunately that will need a firmware update to get working!

Ian
RepRapPro tech support

Edited 1 time(s). Last edit at 01/15/2014 11:37AM by reprappro.
Re: Firmware flashing
January 15, 2014 04:59PM
No one flashing their firmware tonight?!

Ian
RepRapPro tech support
Re: Firmware flashing
January 15, 2014 05:06PM
Hi Ian,

just flashed v59. If I omit "true" it throws an error.

OS: Windows7 64bit

Markus


XBee & electronics blog: [lookmanowire.blogspot.com]
Re: Firmware flashing
January 15, 2014 05:19PM
Quote
markbee
just flashed v59. If I omit "true" it throws an error. OS: Windows7 64bit
Bah! Thanks!
I wish I knew what version of Windows the guy I was talking to this afternoon was using...

Ian
RepRapPro tech support
Re: Firmware flashing
January 15, 2014 05:24PM
I do not know if there is useful,

These days I tested firmware update, Slic3r and Pronterface with Ormeron on:
win 7 - 64
win 7 - 32
debian [cdimage.debian.org] (the netinst.iso is faster to install)
opensuse 12.3 (Dartmouth) (i586)

with win 7 (dos prompt) and a USB drive (E:\)
"bossac --port=COM43 -U true -e -w -b E:\RepRapFirmWare.bin -R"

so far everything went well with the firmware....
everything went well with Linux, only a blue screen (Arduino driver) on win 7 -64
win 7 - 32 OK
win 8? I can not ... sorry

Dario
Re: Firmware flashing
January 15, 2014 05:55PM
Thanks Dario! Do you mean it doesn't work on Windows 7 64-bit because you don't have the device drivers?

I have updated the instructions again, hopefully to make it even clearer. Comments?

Ian
RepRapPro tech support
Re: Firmware flashing
January 15, 2014 06:05PM
Using Windows 7 x64:

Quote

C:\Users\David\Eclipse\RepRapFirmware\Release>C:\Arduino-1.5.4\hardware\tools\bossac.exe --port=COM12 -U -e -w -v -b C:\Users\David\Downloads\RepRapFirmware-059-15-01-2014.bin -R
Invalid USB value: -e

C:\Users\David\Eclipse\RepRapFirmware\Release>C:\Arduino-1.5.4\hardware\tools\bossac.exe --port=COM12 -U true -e -w -v -b C:\Users\David\Downloads\RepRapFirmware-059-15-01-2014.bin -R
Erase flash
Write 168716 bytes to flash
[==============================] 100% (660/660 pages)
Verify 168716 bytes of flash
[==============================] 100% (660/660 pages)
Verify successful
Set boot flash true
CPU reset.

C:\Users\David\Eclipse\RepRapFirmware\Release>

So it doesn't work for me with the "true" removed.

Edited 1 time(s). Last edit at 01/15/2014 06:05PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Firmware flashing
January 15, 2014 06:34PM
Hmm... maybe it's Windows XP that needs 'true' removed. Thanks David!

Ian
RepRapPro tech support
Re: Firmware flashing
January 15, 2014 06:39PM
Quote
droftarts
Hmm... maybe it's Windows XP that needs 'true' removed. Thanks David!

Ian
RepRapPro tech support

I doubt it. Running bossac -h gives this:

Quote

C:\Users\David\Eclipse\RepRapFirmware\Release>C:\Arduino-1.5.4\hardware\tools\bossac.exe -h
Usage: bossac.exe [OPTION...] [FILE]
Basic Open Source SAM-BA Application (BOSSA) Version 1.3a
Flash programmer for Atmel SAM devices.
Copyright (c) 2011-2012 ShumaTech (http://www.shumatech.com)

Examples:
bossac -e -w -v -b image.bin # Erase flash, write flash with image.bin,
# verify the write, and set boot from flash
bossac -r0x10000 image.bin # Read 64KB from flash and store in image.bin

Options:
-e, --erase erase the entire flash
-w, --write write FILE to the flash; accelerated when
combined with erase option
-r, --read[=SIZE] read SIZE from flash and store in FILE;
read entire flash if SIZE not specified
-v, --verify verify FILE matches flash contents
-p, --port=PORT use serial PORT to communicate to device;
default behavior is to auto-scan all serial ports
-b, --boot[=BOOL] boot from ROM if BOOL is 0;
boot from FLASH if BOOL is 1 [default];
option is ignored on unsupported devices
-c, --bod[=BOOL] no brownout detection if BOOL is 0;
brownout detection is on if BOOL is 1 [default]
-t, --bor[=BOOL] no brownout reset if BOOL is 0;
brownout reset is on if BOOL is 1 [default]
-l, --lock[=REGION] lock the flash REGION as a comma-separated list;
lock all if not given [default]
-u, --unlock[=REGION] unlock the flash REGION as a comma-separated list;
unlock all if not given [default]
-s, --security set the flash security flag
-i, --info display device information
-d, --debug print debug messages
-h, --help display this help text
-U, --force_usb_port=true/false override USB port autodetection
-R, --reset reset CPU (if supported)

Report bugs to

C:\Users\David\Eclipse\RepRapFirmware\Release>

So it looks to me that that after -U you must specify either 'true' or 'false'. If you want to omit 'true' then you must omit -U as well.

I am using bossac shipped with Arduino 1.5.4 because that's the version I have to install to build the firmware. It's possible that 1.5.5 has a different version of bossac.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Firmware flashing
January 15, 2014 06:47PM
Ian,

I think that the "true" is a parameter for the -U switch, and tells bossac which USB port to use (hence the error messages on dc42's attempt of removing "true", "-e" was taken as a parameter to "-U" rather than a switch in its own right). I use the words parameter and switch loosely, I'm not a command line person, nor a C guy - maybe argument makes more sense than parameter.

Anyway, I reckon you'd get more success by setting "false" (at least you wouldn't get a USB error on -e), though whether you'd get the result you want on a duet (which only has one USB port) is another thing
[edit] I see I was too long in ruminating and dc nailed it by looking in the right place - I couldn't find any useful reference on the internet so just guessed)[/edit]

Edited 1 time(s). Last edit at 01/15/2014 06:50PM by rayhicks.
Re: Firmware flashing
January 15, 2014 08:06PM
Cool, thanks guys. I've put 'true' back in the instructions. Maybe the guy I was talking to had deleted -U without telling me. We got it flashed in the end!

Ian
RepRapPro tech support
Re: Firmware flashing
January 16, 2014 04:24AM
Quote
droftarts
Thanks Dario! Do you mean it doesn't work on Windows 7 64-bit because you don't have the device drivers?

I have updated the instructions again, hopefully to make it even clearer. Comments?

Ian
RepRapPro tech support

I regularly use Windows 7 - 64 ..
has happened only once during the tests ..
I see no problems

Of course Linux is more comfortable for me.... I love to be free.
Sorry, only registered users may post in this forum.

Click here to login