New Python Firmware Uploading Script

That allows to upload the new firmware directly from the RaspberryPi

New Python Firmware Uploading Script

Postby Pimaster » Mon Jun 16, 2014 10:50 am

Hi,

New Python Script that allow to upload the new firmware directly from the RaspberryPi has been released by Vit Safar.

https://app.box.com/s/lnna523n4y7zcfltm33z

Now you can use the RPi+UPiS pair without PC. Please be sure that during this procedure the pair of RPi+UPiS needs to be powered via RPi micro USB.

Any comments are welcome
My Warmest Regards
Pi Master
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1593
Joined: Fri Sep 14, 2012 7:50 am

Re: New Python Firmware Uploading Script

Postby Graham S » Thu Jun 19, 2014 10:19 pm

Can I update the UPiS when on EXT power via the UPiS or does it have to be RPi USB?
Graham S
 
Posts: 48
Joined: Thu Feb 06, 2014 11:07 pm

Re: New Python Firmware Uploading Script

Postby Pimaster » Thu Jun 19, 2014 11:16 pm

After firmware update, there is a reset instruction, so it start up everything (you need also to make @factory or appropriate PICo command) so it will cut the power. If you are use powering from the UPiS, this cut of power with unconditional cut the RPi powering. It can corrupt files. For that reason you need to power it from the RPi micro USB. Same with EPR, if it finish uploading it will cut the power to the RPi. On your won risk you can do it, but you can have files corruption.
I would rather sugest to power the system for files uploading from the RPi.

Warmest Regards
Pi Master
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1593
Joined: Fri Sep 14, 2012 7:50 am

Re: New Python Firmware Uploading Script

Postby dbridges » Wed Jul 16, 2014 1:35 pm

Apologies if I am asking the obvious here, but despite trying to use the python script with three different .hex files, I can not get the python script to complete:

Code: Select all
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.07_beta.hex
Validating firmware: OK
Checking communication with bootloader: KO
ERROR: Failed to establish communication with bootloader in UPiS. Is the UPiS in the bootloader mode? (Red LED lid on UPiS)
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.09_beta.hex
Validating firmware: KO
Line 1 : Invalid bytecode checksum! Defined: 77 Calculated: 61
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.091_beta.hex
Validating firmware: OK
Checking communication with bootloader: KO
ERROR: Failed to establish communication with bootloader in UPiS. Is the UPiS in the bootloader mode? (Red LED lid on UPiS)


Looks like the 1.09 hex file is incorrect, but I don't understand the comment about the red LED lid on UPiS. All I have done is copied the hex and python script to the pi, plugged the UPiS and Pi into a microUSB power source and then run the script. Is there something else I should be doing?
dbridges
 
Posts: 3
Joined: Wed Jul 16, 2014 7:13 am

Re: New Python Firmware Uploading Script

Postby n0ahg » Thu Jul 17, 2014 9:03 am

dbridges wrote:Apologies if I am asking the obvious here, but despite trying to use the python script with three different .hex files, I can not get the python script to complete:

Code: Select all
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.07_beta.hex
Validating firmware: OK
Checking communication with bootloader: KO
ERROR: Failed to establish communication with bootloader in UPiS. Is the UPiS in the bootloader mode? (Red LED lid on UPiS)
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.09_beta.hex
Validating firmware: KO
Line 1 : Invalid bytecode checksum! Defined: 77 Calculated: 61
pi@ColdSentinel3 ~ $ ./fwupdate_1_3.py -f UPiS_1.091_beta.hex
Validating firmware: OK
Checking communication with bootloader: KO
ERROR: Failed to establish communication with bootloader in UPiS. Is the UPiS in the bootloader mode? (Red LED lid on UPiS)


Looks like the 1.09 hex file is incorrect, but I don't understand the comment about the red LED lid on UPiS. All I have done is copied the hex and python script to the pi, plugged the UPiS and Pi into a microUSB power source and then run the script. Is there something else I should be doing?


This is covered in the manual
n0ahg
 
Posts: 51
Joined: Fri May 23, 2014 11:33 pm

Re: New Python Firmware Uploading Script

Postby dbridges » Thu Jul 17, 2014 12:10 pm

Thanks for the heads up n0ahg. I had actually combed through the manual before asking, but somehow missed the info (for anyone else out there look at p53 in the manual v 1.10). Unfortunately while I have now got the UPiS in the bootloader mode (solid red light at position D12), I am still getting exactly the same error message. Anything else I can try?
dbridges
 
Posts: 3
Joined: Wed Jul 16, 2014 7:13 am

Re: New Python Firmware Uploading Script

Postby dbridges » Thu Jul 17, 2014 12:21 pm

I have eventually found out what the problem was - the manual shows a picture for how the jumpers should be arranged in Fig 28. This is incorrect and they should be as they are shown in Fig 37. To help anyone else out trying to do this, also follow the instructions on p52 to put the Pi into the bootloader mode.I spent many hours combing through the manual trying to work this out so hope this helps someone as it is not the easiest document to follow.
dbridges
 
Posts: 3
Joined: Wed Jul 16, 2014 7:13 am

Re: New Python Firmware Uploading Script

Postby fmgkamps » Wed Aug 20, 2014 8:23 pm

I am trying to upload the firmware from version 1.061beta to 1.096beta using the python script.

The UPiS is in bootloading mode (Red led is on) and the jumpers are in the position as in fig 37 of the manual. (I use this setting also to setup the UPiS using minicom and this works). I guess the serial port setup is correct.

If I start the Python script I get this:
Code: Select all
pi@raspberry ~ $ ./fwupdate_1_3.py -f UPiS_1.096_beta.hex
Validating firmware: OK
Checking communication with bootloader: KO
ERROR: Failed to establish communication with bootloader in UPiS. Is the UPiS in the bootloader mode? (Red LED lid on UPiS)
fmgkamps
 
Posts: 2
Joined: Thu May 08, 2014 8:53 pm

Re: New Python Firmware Uploading Script

Postby Pimaster » Thu Aug 21, 2014 1:15 pm

Hi,

My answer is in the text


I am trying to upload the firmware from version 1.061beta to 1.096beta using the python script.
OK

The UPiS is in bootloading mode (Red led is on) and the jumpers are in the position as in fig 37 of the manual.
it is OK

(I use this setting also to setup the UPiS using minicom and this works). I guess the serial port setup is correct.
check your serial ports settings as described in the manual, if it is still not working, then try to use the USB and PC for new firmware upload. The python script is an alternative way

Please keep me informed

Warmest regards
Pi MAster
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1593
Joined: Fri Sep 14, 2012 7:50 am

Re: New Python Firmware Uploading Script

Postby Doragan » Wed Nov 12, 2014 12:47 pm

I am having issues getting the UPiS into bootloader mode before using this to update the software. I follow the procedure of pressing the buttons on the device, but the red LED only lights briefly before going back to green. Has anyone else had this problem? Does anyone know a solution?
Doragan
 
Posts: 2
Joined: Wed Nov 12, 2014 12:42 pm

Next

Return to New Python Firmware Uploading Script

Who is online

Users browsing this forum: No registered users and 1 guest

cron