Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sometimes can't uploadfiles to 18F45K50
06-10-2015, 05:23 PM,
#1
Sometimes can't uploadfiles to 18F45K50
Hey
My setup is:
PIC18F45K50 DIY board
Bootloader V4
Sometimes I can upload blink.pde:

Code:
[OUT] Compiling: C:\pinguino-11\user\examples.Basics\Blink\Blink.pde
[OUT] Board: Pinguino 45k50
[OUT] Proc: 18f45k50
[OUT] Arch: 8
[OUT] Bootloader: v4
[DEBUG] Starting 'verify' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'preprocess' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'remove_comments' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'remove_comments': 0.00 s
[DEBUG] Ending 'remove_comments'
[DEBUG] Starting 'remove_comments' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'remove_comments': 0.00 s
[DEBUG] Ending 'remove_comments'
[DEBUG] Starting 'get_regobject_libinstructions' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'get_regobject_libinstructions': 0.00 s
[DEBUG] Ending 'get_regobject_libinstructions'
[DEBUG] Starting 'replace_word' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'replace_word': 0.01 s
[DEBUG] Ending 'replace_word'
[DEBUG] Time spent for 'preprocess': 0.09 s
[DEBUG] Ending 'preprocess'
[DEBUG] Starting 'compile' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'compile': 0.21 s
[DEBUG] Ending 'compile'
[DEBUG] Starting 'link' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'link': 0.07 s
[DEBUG] Ending 'link'
[DEBUG] Time spent for 'verify': 0.43 s
[DEBUG] Ending 'verify'
[OUT] compilation done
[OUT] Code size: 3362 / 29696 bytes (11% used)
[OUT] 0.431 seconds process time
[DEBUG] Starting '__upload__' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'upload' from 'qtgui.pinguino_api.uploader.uploader'
[DEBUG] Looking for a Pinguino device ...
[DEBUG] Found device 0x04D8:0xFEAA
[DEBUG] Pinguino found ...
[DEBUG] OS is windows
[DEBUG] Configuration set
[DEBUG] Interface claimed
[DEBUG] Everything OK so far
[DEBUG]  - with PIC18f45k50 (id=5C00)
[DEBUG]  - with 29696 bytes free (29 KB)
[DEBUG]    from 0x00C00 to 0x08000
[DEBUG]  - with USB bootloader v4.14
[DEBUG] Uploading user program ...
[DEBUG] 3362 bytes written.
[DEBUG] Blink.hex successfully uploaded
[DEBUG] Starting user program ...
[DEBUG] Device closed
[DEBUG] Time spent for 'upload': 0.37 s
[DEBUG] Ending 'upload'
[DEBUG] Time spent for '__upload__': 0.39 s
[DEBUG] Ending '__upload__'
[OUT] Pinguino found ...
[OUT]  - with PIC18f45k50 (id=5C00)
[OUT]  - with 29696 bytes free (29 KB)
[OUT]    from 0x00C00 to 0x08000
[OUT]  - with USB bootloader v4.14
[OUT] Uploading user program ...
[OUT] 3362 bytes written.
[OUT] Blink.hex successfully uploaded
[OUT] Starting user program ...
>>>

But sometimes I can't:
Code:
[OUT] Compiling: C:\pinguino-11\user\examples.Basics\Blink\Blink.pde
[OUT] Board: Pinguino 45k50
[OUT] Proc: 18f45k50
[OUT] Arch: 8
[OUT] Bootloader: v4
[DEBUG] Starting 'verify' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'preprocess' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'remove_comments' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'remove_comments': 0.00 s
[DEBUG] Ending 'remove_comments'
[DEBUG] Starting 'remove_comments' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'remove_comments': 0.00 s
[DEBUG] Ending 'remove_comments'
[DEBUG] Starting 'get_regobject_libinstructions' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'get_regobject_libinstructions': 0.00 s
[DEBUG] Ending 'get_regobject_libinstructions'
[DEBUG] Starting 'replace_word' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'replace_word': 0.01 s
[DEBUG] Ending 'replace_word'
[DEBUG] Time spent for 'preprocess': 0.06 s
[DEBUG] Ending 'preprocess'
[DEBUG] Starting 'compile' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'compile': 0.20 s
[DEBUG] Ending 'compile'
[DEBUG] Starting 'link' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Time spent for 'link': 0.07 s
[DEBUG] Ending 'link'
[DEBUG] Time spent for 'verify': 0.37 s
[DEBUG] Ending 'verify'
[OUT] compilation done
[OUT] Code size: 3362 / 29696 bytes (11% used)
[OUT] 0.371 seconds process time
[DEBUG] Starting '__upload__' from 'qtgui.pinguino_api.pinguino_tools'
[DEBUG] Starting 'upload' from 'qtgui.pinguino_api.uploader.uploader'
[DEBUG] Looking for a Pinguino device ...
[DEBUG] Found device 0x04D8:0xFEAA
[DEBUG] Pinguino found ...
[DEBUG] OS is windows
[DEBUG] Configuration set
[DEBUG] Interface claimed
[DEBUG] Everything OK so far
[DEBUG] Traceback (most recent call last):
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api    ools.py', line 23, in inset
[DEBUG]     ret = f(*args, **kwaargs)
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api\uploader\uploader.py', line 179, in upload
[DEBUG]     self.uploader.uploadDevice(self.hexfile, self.board)
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api\uploader\uploader8.py', line 487, in uploadDevice
[DEBUG]     device_id = self.getDeviceID(handle)
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api\uploader\uploader8.py', line 220, in getDeviceID
[DEBUG]     usbBuf = self.readFlash(handle, 0x3FFFFE, 2)
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api\uploader\uploader8.py', line 275, in readFlash
[DEBUG]     return self.sendCommand(handle, usbBuf)
[DEBUG]   File 'C:\pinguino-11\qtgui\pinguino_api\uploader\uploader8.py', line 171, in sendCommand
[DEBUG]     sent_bytes = handle.bulkWrite(self.OUT_EP, usbBuf, self.TIMEOUT)
[DEBUG]   File 'C:\Python27\lib\site-packages\usb\legacy.py', line 148, in bulkWrite
[DEBUG]     return self.dev.write(endpoint, buffer, self.__claimed_interface, timeout)
[DEBUG]   File 'C:\Python27\lib\site-packages\usb\core.py', line 633, in write
[DEBUG]     self.__get_timeout(timeout)
[DEBUG]   File 'C:\Python27\lib\site-packages\usbackend\libusb0.py', line 482, in bulk_write
[DEBUG]     data, timeout)
[DEBUG]   File 'C:\Python27\lib\site-packages\usbackend\libusb0.py', line 564, in __write
[DEBUG]     timeout
[DEBUG]   File 'C:\Python27\lib\site-packages\usbackend\libusb0.py', line 392, in _check
[DEBUG]     raise USBError(errmsg, ret)
[DEBUG] USBError: [Errno None] usb_reap: timeout error
[DEBUG]
[DEBUG] Time spent for '__upload__': 10.05 s
[DEBUG] Ending '__upload__'
[OUT]

What might be the cause of the problem?
Windows 7.

PS: the "File sucessfully uploaded to pinguino" messagebox is showing regardless of the upload result, in both showed cases Big Grin
Reply
08-10-2015, 06:10 PM,
#2
RE: Sometimes can't uploadfiles to 18F45K50
(06-10-2015, 05:23 PM)B4lfiz4r Wrote:
Code:
[DEBUG] USBError: [Errno None] usb_reap: timeout error
[DEBUG]
[DEBUG] Time spent for '__upload__': 10.05 s
[DEBUG] Ending '__upload__'

Too much trafic on the USB port ? CPU busy ?

Try to increase the TIMEOUT (line 106) value in qtgui/pinguino_core/uploader/uploader8.py
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)