Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upload won't work, but shows error only when pinguino disconected
19-08-2014, 09:20 PM,
#1
Upload won't work, but shows error only when pinguino disconected
Bootloader seems to work fine (runled is blinking fast), program compiles, but when it comes to upload:
- when board is disconected it shows message:
Quote:Pinguino not found
If your device is connected,
press the Reset button to switch to bootloader mode

- when board is connected, nothing happens, no error, no message, nothing in shell

dmesg:
Quote:[11279.968817] usb 2-2: new full-speed USB device number 29 using ohci-pci
[11280.169683] usb 2-2: not running at top speed; connect to a high speed hub
[11280.184705] usb 2-2: New USB device found, idVendor=04d8, idProduct=feaa
[11280.184716] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[11280.184723] usb 2-2: Product: P8
[11280.184729] usb 2-2: Manufacturer: RB+AG

lsusb:
Quote:Bus 002 Device 029: ID 04d8:feaa Microchip Technology, Inc.

Pinguino:
11.20140819/11.0-beta.1

system:
64bit lubuntu

Shell content (upload doesn't add a single line to it):
Quote:>>> compilling: /home/daniel/Pobrane/test.pde
>>> Board: Pinguino 2550
>>> Proc: 18f2550
>>> Arch: 8
>>> Boootloader: v4
>>>
>>> compilation done
>>> code size: 936 / 29696 bytes (3% used)
>>> 0.143 seconds process time
>>>

Anything else I can check/do to make it work?
Reply
20-08-2014, 08:59 AM,
#2
RE: Upload won't work, but shows error only when pinguino disconected
Hi,
Would you try this link http://pinguino.cc/download.php and follow the procedure. See also this post in News : PINGUINO v11 for Raspberry Pi / pre-release dated 26-6-2014.
It has worked for me with pinguino 8bits.
André
Reply
20-08-2014, 11:03 AM,
#3
RE: Upload won't work, but shows error only when pinguino disconected
(20-08-2014, 08:59 AM)gtcbreizh Wrote: Would you try this link http://pinguino.cc/download.php and follow the procedure. See also this post in News : PINGUINO v11 for Raspberry Pi / pre-release dated 26-6-2014.
It has worked for me with pinguino 8bits.
André

Thanks Andre for your reply, but it's just simple installation and usage instruction. I did it exactly like there.

I would'nt expect such a discussion in News, but there it is, I have nearly similar problem:
http://forum.pinguino.cc/showthread.php?tid=4426

But so far no solution from there seemed to work for me. Except, when I start pinguino as root and try to upload, I get this message:
Quote:>>> Pinguino found
>>> Upload not possible
>>> Try to restart the bootloader mode

and solutions like:
- changing permissions in '/etc/udev/rules.d/41-microchip.rules' to 666
- sudo apt-get install libusb-0.1-4:i386

didn't change anything, still same problem...
Reply
20-08-2014, 12:09 PM,
#4
RE: Upload won't work, but shows error only when pinguino disconected
A temporary workaround seems to start Pinguino as Root from a Terminal :
sudo python /usr/share/pinguino-11/pinguino.py

Could you try this standalone uploader here ?

1/ compile the blink example for your Pinguino board with the IDE. You'll get a hex file in the blink directory.
2/ give uploader8.py the path to the hex file (Usage : ./uploader8.py path/filename.hex)
3/ report any error message
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
20-08-2014, 12:22 PM,
#5
RE: Upload won't work, but shows error only when pinguino disconected
Hi Daniel,
Do you get a very fast led flashing when you enter in bootloader mode ?
Did you already check your board with IDE X (previous IDE) ?
In the start menu/ developpement tab do you find "Pinguino IDE 11.20140617" as label ?
I verify again under LinuxMint and uploading works like a charm !
André
Reply
20-08-2014, 03:14 PM, (This post was last modified: 20-08-2014, 04:12 PM by daniel.)
#6
RE: Upload won't work, but shows error only when pinguino disconected
(20-08-2014, 12:09 PM)regis Wrote: A temporary workaround seems to start Pinguino as Root from a Terminal :
sudo python /usr/share/pinguino-11/pinguino.py

Yes, I did it, I did start pinguino from as root, and I got that message I wrote above.

(20-08-2014, 12:09 PM)regis Wrote: Could you try this standalone uploader here ?

I will definitely try this, but I've just realized (when browsing source, that there is no entry for my 18LF2550:

Quote: 0x1240: ['18f2550' , 0x08000, 0xff ],
0x2a40: ['18f2553' , 0x08000, 0xff ],
0x4c20: ['18f25j50' , 0x08000, 0x00 ],
0x4ce0: ['18lf25j50' , 0x08000, 0x00 ],
0x5c20: ['18f25k50' , 0x08000, 0xff ],
0x5ca0: ['18lf25k50' , 0x08000, 0xff ],


(20-08-2014, 12:09 PM)regis Wrote: 1/ compile the blink example for your Pinguino board with the IDE. You'll get a hex file in the blink directory.
2/ give uploader8.py the path to the hex file (Usage : ./uploader8.py path/filename.hex)
3/ report any error message

I will check it



Standalone uploader works almost fine with sudo, this is output:

Quote:Pinguino found ...
- with PIC18f2550 (id=0x1240)
- with 29696 bytes free (29 KB)
- with USB bootloader v4.12
Uploading user program ...
936 bytes written
test.hex successfully uploaded
Starting user program ...
-19
Traceback (most recent call last):
File "./uploader8.py", line 669, in <module>
main(sys.argv[1])
File "./uploader8.py", line 654, in main
resetDevice(handle)
File "./uploader8.py", line 263, in resetDevice
handle.bulkWrite(OUT_EP, usbBuf, TIMEOUT)
usb.USBError: No such device
Reply
20-08-2014, 04:52 PM,
#7
RE: Upload won't work, but shows error only when pinguino disconected
Quote:... there is no entry for my 18LF2550
This is not a problem with the standalone version but I think you board is rejected by the IDE version as your proc is different from what the IDE expect. You should get a message like this : Error: Program compiled for %s but device has %s. Note that luckily both uploaders (standalone or IDE version) should give you the right Device ID so that you can add it to the list for test (and then give it to me in order to fix this bug). But you will have to add a new board definition in boards.py and some #define in every Pinguino C libraries.
I think we could find a better solution if the uplader manage all LF versions as normal versions.
I took a look at some IDs and I think there is a link between LF ID and Normal ID.
LF ID = Normal ID + 0xC0
LF2550 should be then 2550 ID + C0 = 0x1240 + 0xC0 = 0x1300
Can you confirm ?

However, what you got from the uploader is a bit strange as it returns a 18F2550 Device ID not a 18LF2550 as you can see :
Quote:Pinguino found ...
- with PIC18f2550 (id=0x1240)

Quote:My 18LF2550 reports on usb as: 04d8:feaa, maybe that is a reason?
These are USB VENDOR and PRODUCT ID (04d8=Microchip and feaa=Microchip Licence for Pinguino).
Everything is right on this side.
Quote:Standalone uploader works almost fine with sudo, this is output:
Please try as normal user.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
20-08-2014, 04:53 PM,
#8
RE: Upload won't work, but shows error only when pinguino disconected
For test I've written a simple code:

void loop()
{
PORTAbits.RA4=0;
delay(500);

PORTAbits.RA4=1;
delay(500);
}

And after first manual upload it worked! Slow blinking occured.

Now it doesn't. Actually it says that program was successfully uploaded, RUNLED stops fast blinking during upload, and after upload starts blinking fast again. Sounds like bootloader doesn't boot into a program after upload.

Most of the time I get this same uploader output:

Quote:Pinguino found ...
- with PIC18f2550 (id=0x1240)
- with 29696 bytes free (29 KB)
- with USB bootloader v4.12
Uploading user program ...
936 bytes written
test.hex successfully uploaded
Starting user program ...
-19
Traceback (most recent call last):
File "./uploader8.py", line 669, in <module>
main(sys.argv[1])
File "./uploader8.py", line 654, in main
resetDevice(handle)
File "./uploader8.py", line 263, in resetDevice
handle.bulkWrite(OUT_EP, usbBuf, TIMEOUT)
usb.USBError: No such device
Reply
20-08-2014, 05:01 PM,
#9
RE: Upload won't work, but shows error only when pinguino disconected
(20-08-2014, 04:53 PM)daniel Wrote: - with USB bootloader v4.12

Try first with bootloader v4.14 (the latest version) : https://github.com/PinguinoIDE/pinguino-...b/v4.x/hex
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
20-08-2014, 05:06 PM, (This post was last modified: 20-08-2014, 05:09 PM by daniel.)
#10
RE: Upload won't work, but shows error only when pinguino disconected
Quote:LF2550 should be then 2550 ID + C0 = 0x1240 + 0xC0 = 0x1300
Can you confirm ?

Where can I locate proper ID?

Quote:
Quote:My 18LF2550 reports on usb as: 04d8:feaa, maybe that is a reason?
These are USB VENDOR and PRODUCT ID (04d8=Microchip and feaa=Microchip Licence for Pinguino).

I know that, I misunderstood DEVICE ID with PRODUCT ID.


Quote:Please try as normal user.

Doesn't work at all:
Quote:Pinguino found ...
Traceback (most recent call last):
File "./uploader8.py", line 669, in <module>
main(sys.argv[1])
File "./uploader8.py", line 598, in main
handle = initDevice(device)
File "./uploader8.py", line 233, in initDevice
handle.setConfiguration(ACTIVE_CONFIG)
usb.USBError: could not set config 1: Operation not permitted

(20-08-2014, 05:01 PM)regis Wrote: Try first with bootloader v4.14 (the latest version) : https://github.com/PinguinoIDE/pinguino-...b/v4.x/hex

I would love to, but I'm not equipped with programming device. I bought my microcontrollers with bootloader already on it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)