-
Notifications
You must be signed in to change notification settings - Fork 132
uploading to a Micro gives error on com port COM (improvement on the (reporting of) the upload) #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not anymore in front of my PC, but I believe there might be another change that could have caused this: I did run an update of the plugin which reported a new version was available. |
IMHO Nothing changed in that area recently. Note that updates to the website will also result in a new plugin version when using the nightly build. And I did a lot of those lately. ;-) |
Ok, then why do I get that message? :-)
As you can see the provided port parameter is |
the command states -P COM4 but the error message states .\COM4. |
The upload command looks quite different on the Arduino IDE as it points to COM5...
It seems Eclipse IDE doesn't try to reset the board before attempting the upload. Because I'm using Arduino IDE 1.5.8 with the new toolchain I tried to compare the I double checked with an original Uno R3, a Uno R3 clone and a Mega 2560 clone, they all worked nicely, but they do not need a reset procedure. |
What I see is that the micro has these settings
This means that the micro should be reset and that a different port should be used. The includes not being there indeed rings a bell but..... although don't jump to early conclusions. There are several "normal" reasons why the includes would not be there. The includes are generated by the indexer. If the indexer didn't finish the includes won't be there. Switching board on a project must relaunch the indexer, so you may have checked to early. |
The indexer doesn't seem to pick the libraries, I gave it plenty of time and clean/rebuild/reindex didn't help.
Forcing reindexing produces the following in the same error log Eclipse view:
Along with that I get multiple warnings and compilation errors in the editor but compilation in the console view completes nicely with just some warnings. While this is not critical to me (I have other boards for development) I believe this might be something we should fix. If I just switch back the Arduino Eclipse configuration to ArduinoIDE 1.5.5 all the editor errors disappear and the libraries get linked correctly (the indexer successfully finds the header files), but the upload still fails with the same error. My impression is we are looking at two separate issues. |
I agree on this one.
This means the reset is not successful and as such com4 is used instead of com5 during upload. for the indexer issue I propose to do the same as with the similar issue we had. That is turn the "allocate console view on" in the project properties->C/C++ general->pre processor include paths, macro's etc->providers->Arduino compiler settings And run that command you see at the top of the console on the command line in the arduino folder Send both outputs (console and command line) to me. |
I simplified the upload process in case of "looking for new com port" and most of all added lots of comments to the console so we can better analize problems.
I have made a fix that may fix your upload issue but it is actually targeted at being more verbose about the upload so we have a better understanding what goes wrong. |
I've updated the Arduino Eclipse plugin to the latest nightly build On the other hand I still cannot upload to my micro and I'm getting the same output in the console view:
The error log contains only two items related to the plugin:
and
I wonder if I've missed something or if the update doesn't contain your changes yet. |
The update doesn't contain the changes yet. |
Update installed, no joy. As you can see I tried a different USB port just to exclude other possible source issues: COM7 is on the back of my desktop.
At first glance it seems the plugin fails quite sooner than the ide. If you want me to do a small change in the source code and rebuild, keep in mind I should be able to it without needed a nightly build. |
can you provide the output with com4? It is very easy to do local development. See the readme.md here https://github.com/jantje/arduino-eclipse-plugin |
From what I understand the touch to the serial port to reset the arduino is not working properly. It may be a good test to remove the Thread.sleep(openTime); If you can't do a local test give me a shout and I'll do it and you can see tomorrow. |
You pointed me to the right direction, but apparently the issue was related to a too short delay between the checks. Please note the Arduino IDE waits up to 10 seconds for the COM port to show up, sleeping for 250ms between each try and adding an additional 300ms wait after the 1200 baud reset request on non MacOS platforms: this latter delay seems to be needed to avoid a subsequent reset which would invalidate the 1200 baud reset. It takes 3 seconds for my original Micro to show up the upload COM port on my very performing desktop PC: I believe 2 seconds were not enough on many machines and even 5 seconds (the current setup) might not be enough on slower machines. Can we put those information into a preference option or, in case that would be too much hassle, provide a way to override the defaults by using something like eclipse environment variables? I'm not really proficient with Eclipse, but I might be able to do something myself if you can point me in the right direction 😄 |
Last note: I played a bit with the parameters once I had it working and it takes about 2800ms for my Micro to reset and show up. We can revert back to 100ms sleep (both per check and after 1200 baud reset request) to save a little less than half a second in the upload process, but we need to boost the number of retries up from the current 20 to about 50 in order to accommodate slower computers.
|
If that is what arduino does now; That should be the same for the plugin.
I'll do it this evening |
Fix for issue #209 Missed this one. Will fix remaining issues this evening.
Ok. delay it's already at 250 and we have the 300ms wait, but I didn't know how to check the platform. Number of trials needs to be bumped up to 40. |
Untested .... scary .... |
works fine |
from issue arduino/Arduino#2422 (comment)
I'm not sure if this is related to the new toolchain or not, but while everything works fine with the Uno and the Pro Mini, I'm having issues uploading to a Micro which seems not resetting the COM.
Launching R:/Tools/ArduinoIDE/hardware/tools/avr/bin/avrdude -CR:/Tools/ArduinoIDE/hardware/tools/avr/etc/avrdude.conf -patmega32u4 -cavr109 -P COM4 -b57600 -D -Uflash:w:R:\Arduino\workspace\temp/Release/temp.hex:i
Output:
avrdude: ser_open(): can't open device ".\COM4": Impossibile trovare il file specificato.
avrdude: ser_send(): write error: sorry no info avail
The issue doesn't occur when using the Arduino IDE 1.5.8 and I'm currently unable to verify if it's unrelated to the new toolchain, but somebody else might do a quick test.
I'm trying to upload a simple blink firmware.
The text was updated successfully, but these errors were encountered: