Pages: [1] 2   Go Down
Author Topic: "Uploading to I/O board" never finishing  (Read 1982 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I have been making changes and uploading things for several weeks with no trouble. Arduino build 0021, MEGA 2560 via USB. Binary sketch size is now 29444 bytes (of a 258048 byte maximum). It compiles and gets to the message "Uploading to I/O bard" and never completes the upload.

The IDE is still responsive and I can cancel it, but then I get a message about it being unable to delete a temp file. If I try upload again, I get a message the COM port is in use. I have to either reboot or unplu/plug the USB to clear that, but then upload will fail again and again and... after that.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Update - I loaded a smaller sketch as a sanity check. That works fine. I commented out some currently unused code in the big project but the size stayed the same and it still failed.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 553
Posts: 46291
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I commented out some currently unused code in the big project but the size stayed the same and it still failed.
I think this proves that the compiler already knew the stuff was unused, and optimized it away. The used stuff stayed the same size, because nothing really changed.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, it seems to have block sizes or something. I did more changes and got it back to 27600, which I am almost certain it had been up to or over before and it is still failing. Something else seems to trigger this besides just size. As mentioned earlier, old smaller projects do work.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 553
Posts: 46291
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You know, I presume, that there are 3 kinds of memory on an Arduino - flash, where the code goes, SRAM, where the variables and strings and stacks go, and EEPROM.

The only size that is reported is flash. The only use of EEPROM is in your code, so presumably you know how much of that you are using.

It is possible that you are overflowing SRAM, even though the sketch size is still relatively small. Do you have large arrays in the sketch? Or a lot of smaller ones?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I have a reasonable sized working set. I log operations to SD and move on. If there is a leak somewhere, that would be run time and not affect this.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Here is something bizarre...

On another attempt:

Binary sketch size: 27496 bytes (of a 126976 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Where did the additional 96 bytes come from? No changes were made.
But this time I got an error instead of an endless wait.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW, this is on a Win7 Started edition netbook. No changes were made to anything other than source code in my project from when it worked and other projects still work.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 553
Posts: 46291
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
No changes were made to anything other than source code in my project from when it worked
Might I suggest, then, that this sketch is not compatible with the Mega, for some reason. If you post the sketch, perhaps we can help spot the difficulties.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Latest changes were purely program logic, not hardware related. No, for proprietary reasons and practicality (it is very large and complex; I would be answering well meaning but irrelevant questions for days).

However, because I need to do some testing today, I tried uploading what worked a few days ago and now it fails to upload.

So something has changed, hardware wise. I am going to power off everything for a few minutes and look close for anything that could have pulled loose (but why does it setill load small sketches?)...
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That last result where I got an error was from downloading an older version then seeing I could not select a MEGA 2560 and scraping that idea. It changed what board is selected.

Please note that this just invalidated the one test, it did not fix my problem. Nor did powering down. Now I have people about to arrive with hardware to go do a field test and I will look like an idiot unless something happens very quickly.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just thought about that last test; it wasn't valid, so I did it again making sure the board was selected properly. It worked - I have code from a few days ago that will give me meaningful test results. I still have to figure out the issue later.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will have to do some diffs and see what caused the problem. I actually added back a lot of the code on the fly today making adjustments to to the code from a couple of days ago that works during testing.Testing went very well and I didn't look like an idiot even if I felt like a lucky one...
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 553
Posts: 46291
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Testing went very well and I didn't look like an idiot even if I felt like a lucky one...
It's a great feeling when you can keep a secret. ;D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I"m having the exact same problem, my mega arduino never finished uploading, and the uploading button remains orange even after I get the timeout message.

I'm completely new to arduino and currently I can't even upload the "Blink" sketch-which is extremely frustrating.

What did you do to get it to work?
Logged

Pages: [1] 2   Go Up
Jump to: