Hung sketch? Unable to upload?

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
dtbaker
Posts: 26
Joined: Sat Jun 02, 2012 12:52 pm

Hung sketch? Unable to upload?

Post by dtbaker » Sat Apr 27, 2013 1:18 pm

Hey guys,

Does anybody know why the leostick does not show up in my Tools > Serial Port list until after the sketch has loaded?

Haven't plugged this leostick into a computer in a long time. When I plug it into USB it goes straight to the Sketch (I think) because the blue LED comes on and then the other LED goes bright green straight away. There is no "breathing red" when initially plugging it in.

If I press the reset button while plugged into USB it will breath red for a few seconds, but during this breathing the leostick does not show up in the Tools > Serial Port list. Once the LED goes bright green (Sketch starts?) the Tools > Serial Port list shows the leostick, and the serial monitor outputs a series of 0's once a second (probably some debugging from previous sketch).

When trying to upload I get this error:

Code: Select all

Binary sketch size: 4,320 bytes (of a 28,672 byte maximum)
Found programmer: Id = "0000000"; type = 0
    Software Version = 0.0; Hardware Version = 0.0
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
It will only upload once the sketch starts because the serial port does not display until the sketch starts.

This also results in a bunch of dead avrdude processes on this linux laptop. Have tried Arduino IDE 1.0.1 and 1.0.4 and the suggestions in the other hung sketch threads.

Is there some magic "reset to factory defaults" method for the leostick?

Cheers,
Dave

dtbaker
Posts: 26
Joined: Sat Jun 02, 2012 12:52 pm

Re: Hung sketch? Unable to upload?

Post by dtbaker » Sat Apr 27, 2013 2:17 pm

Have just tried on a Windows XP and Windows 7 computer. Went through the driver process on both and got some success on Windows 7.

many attempts to upload "blink" and one of them did something, now the green LED has turned off (from the previous sketch) but now no LED is shown (ie: blink didn't load successfully).

Back on the linux computer now to try it a few more times, then I'll go back to windows.

Getting this in the output of avrdude now:

Code: Select all

Found programmer: Id = "CATERIN"; type = 

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: Hung sketch? Unable to upload?

Post by angusgr » Tue Apr 30, 2013 11:59 pm

Hi Dave,

Sorry to hear your LeoStick isn't behaving. I just have a couple of questions:

* Are you using the LeoStick v2.0 profile not v1.0? I think you have a v2.0 LeoStick because of the message "Found programmer: Id = "CATERIN"" message (caterina is the name of the bootloader in LeoStick v2.0.)

* On Linux, can you plug in your LeoStick, attempt an upload, then run the command 'dmesg' in a terminal to get a kernel log (easiest to send it to a file ie 'dmesg > mykernellog.txt'), and then post it somewhere like pastebin for me please?

* In the Arduino IDE, could you please go to File -> Preferences and enable "Show verbose output during... upload". Then copy-paste the output from the upload window? (There's quite a lot of it so if you could put it on pastebin as well, that would be great.)

Cheers,

Angus

dtbaker
Posts: 26
Joined: Sat Jun 02, 2012 12:52 pm

Re: Hung sketch? Unable to upload?

Post by dtbaker » Wed May 01, 2013 12:45 am

Hi Angus!!

Thanks for the reply. Here is output running arduino 1.0.4 as root on a fresh Ubuntu 13.04 install. V2 hardware loaded in and selected from the IDE list:

http://pastebin.com/1SFztyqC

After pressing the LeoStick reset button and then clicking upload a second time (straight after the above upload without unplugging LeoStick) I get less error output:

http://pastebin.com/h7cy2FXu

After doing a 3rd reset, the Serial Port changed in the IDE and ubuntu popped up a crash report about the "modem-manager" program, and I got this output: http://pastebin.com/cFZruUqn

I'm doing a search now to find out why my modem-manager ignore rules are not working or if modem-manager is the problem here.

Cheers,
Dave

dtbaker
Posts: 26
Joined: Sat Jun 02, 2012 12:52 pm

Re: Hung sketch? Unable to upload?

Post by dtbaker » Wed May 01, 2013 12:52 am

Hey man! Got it working now. Didn't think to check modem-manager again because I was having issues on both windows and linux.

Problem fixed by adding this line to the end of /lib/udev/rules.d/77-mm-usb-device-blacklist.rules

Code: Select all

ATTRS{idVendor}=="26ba", ATTRS{idProduct}=="0002", ENV{ID_MM_DEVICE_IGNORE}="1"
Thanks for looking into it anyway! :D

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: Hung sketch? Unable to upload?

Post by angusgr » Wed May 01, 2013 1:35 am

Ah, I've experienced that myself - should have thought of it - sorry.

I'll put a note on the Getting Started page for Linux users.

EDIT: Done, the note is here (similar but slightly different advice.)

Cheers,

Angus

Post Reply