Author Topic: problem with firmware upgrade  (Read 2554 times)

ben

  • Newbie
  • *
  • Posts: 2
problem with firmware upgrade
« on: December 07, 2013, 10:41:56 AM »
Hi,

I got the bright idea to flash the firmware on my pymcu but it failed halfway with the message below and now it longer is detected.
this is the error:

Ignoring Config Bits
Program: (1116 of 1118) Data Rows
Ignoring Config Bits
Program: (1117 of 1118) Data Rows
Program: (1118 of 1118) Data Rows
Writing Program Complete.
Verifying Programmed Data....
Verify: (1 of 1118) Data Rows
Traceback (most recent call last):
  File "./pyBootProgrammer.py", line 270, in <module>
    result = pyBootProgram(options)
  File "./pyBootProgrammer.py", line 252, in pyBootProgram
    errCnt = verifyProgram(s,allHex)
  File "./pyBootProgrammer.py", line 129, in verifyProgram
    vc = int('0x' + vr,0)
ValueError: invalid literal for int() with base 0: '0x$$$$'

Do you have any idea how i can recover from this situation ?

richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: problem with firmware upgrade
« Reply #1 on: December 07, 2013, 03:08:38 PM »
With the resistor in place between PWM1 and VCC unplug pyMCU from USB and then plug it back it, that should cause it to go directly in bootloader mode, then try reprogramming.
http://www.circuitsforfun.com/pyBootLoader.html

ben

  • Newbie
  • *
  • Posts: 2
Re: problem with firmware upgrade
« Reply #2 on: December 08, 2013, 06:26:47 AM »
Hi Richard,

Thanks for your reply. I've tried reprogramming with the resistor in place, but it no longer gets detected:

I see it appearing in dmesg:

[ 1801.020032] ftdi_sio 3-1:1.0: FTDI USB Serial Device converter detected
[ 1801.020156] usb 3-1: Detected FT232RL
[ 1801.020168] usb 3-1: Number of endpoints 2
[ 1801.020176] usb 3-1: Endpoint 1 MaxPacketSize 64
[ 1801.020183] usb 3-1: Endpoint 2 MaxPacketSize 64
[ 1801.020188] usb 3-1: Setting MaxPacketSize 64
[ 1801.020481] usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0

But pybootloader fails to detect it:

root@bubuntu:/home/ben/pygerm# ./pyBootProgrammer.py -f pymcu_1_0_13_PIC.hex -p /dev/ttyUSB0

    *****************************************************
    *    pyBootProgrammer - Python MCU Programmer       *
    *       Originally developed for pyMCU              *
    *       Version: 1.0.1                              *
    *****************************************************

   
Not in Bootloader Mode, or not able to communication with bootloader on port: /dev/ttyUSB0
Not in Bootloader Mode, or not able to communication with bootloader on port: /dev/ttyUSB0



richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: problem with firmware upgrade
« Reply #3 on: December 08, 2013, 11:42:16 AM »
Could you try running the pyBootProgrammer.py without specifying the port and let the software find it automatically.

Also have you tried initializing pyMCU back in the regular mode without the resistor? It looks like from the output while flashing the new firmware the software crashed during verify but the firmware looks like it finished programming.


richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: problem with firmware upgrade
« Reply #4 on: December 09, 2013, 04:06:14 PM »
Ben, if the last suggestion didn't help let me know, send a PM or email to richard at circuitsforfun.com and I can help make arrangements to get you a replacement.
If it did work please also let me know so I will know everything is good now.