Final compile error message

33 views
Skip to first unread message

Paul Stoffregen

unread,
Mar 3, 2016, 4:11:47 AM3/3/16
to devel...@arduino.cc
I'd like to propose adding more info to the final error message that
appears when Verify or Upload fails.

Today the very last line prints in the console and the orange status bar
is "Error compiling."

Now that so many boards exist, with significantly different code, a
common compile problem involves having the wrong board selected. Even
though the board is shown on the lower edge of the window, often people
do not notice it. I've personally helped many users who did everything
correctly except they had the wrong board selected in Tools > Boards.

My hope is to expand this last line to "Error compiling for (boardname)."

Perhaps we could also suppress "exit status 1", which communicates no
useful information and consumes a good portion of the small space
available for useful info without scrolling?

Does this sound like something that could be merged? I know the
on-screen wording and appearance are critically important to Arduino's
usability, so I wanted to ask here before submitting a pull request.



Andrew Kroll

unread,
Mar 3, 2016, 4:24:15 AM3/3/16
to devel...@arduino.cc

I think that's an excellent idea!

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Stefan Dzisiewski-Smith

unread,
Mar 3, 2016, 4:39:54 AM3/3/16
to devel...@arduino.cc
Does "Error compiling for (boardname). Have you checked that you have selected the correct board in Tools -> Board?" add anything? It gives the user a first potential action to check, as opposed to simply telling them more accurately the status of the compile.

I know that we used to get a lot of requests for help on this subject (until I put #error directives to catch incorrect board selection in our examples).

S
--

————————————————————
Stefan Dzisiewski-Smith
Head of Technology
————————————————————
T   + 44 207 650 7977    |   Web      bareconductive.com
M  + 44 779 302 9265    |   Twitter  @BareConductive

                                                                             
       Guardian #Tradeboost  |  Register Here   
                                                                             

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.

Matthew Ford

unread,
Mar 3, 2016, 6:55:52 PM3/3/16
to devel...@arduino.cc
Why not have a pre-load step to query the board for its type.
Design this to be backward compatible
The COM msgs seems to be half way there
Probably only needs to read a couple of bytes from the onboard bootloader.
May not even need a board change depending on how unique the bootloaders are.
But in any case would be good to include going forward.
Plug the board in and the IDE selects the correct compiler settings for you.

matthew

Thibaut VIARD

unread,
Mar 4, 2016, 1:02:11 AM3/4/16
to devel...@arduino.cc

+1

Paul Stoffregen

unread,
Mar 4, 2016, 1:08:34 AM3/4/16
to devel...@arduino.cc

> On 3/03/2016 8:39 PM, Stefan Dzisiewski-Smith wrote:
>> Does "Error compiling for (boardname). Have you checked that you have
>> selected the correct board in Tools -> Board?" add anything?

That's a good question. I'd hoped Tom or Alice or others involved in
Arduino's usability might offer an opinion.

Truth is, I'm an engineer who's good at the technical side, and I do
directly help real people every day, so I do see these little places
where they get stuck. But on the matter of how to best improve the
messages, really I'm just guessing here. Software usability is tricky
and involves lots of subtle trade-offs that defy the sort of logical
analysis that works for purely technical problems.


Tom Igoe

unread,
Mar 4, 2016, 1:17:37 AM3/4/16
to devel...@arduino.cc, Alice Pintus
Sorry, been on the road and behind on email. cc:ing Alice, as I am not sure she reads the developers’ list closely, and she would definitely have an opinion on a more helpful error message to replace the the final error message that 

appears when Verify or Upload fails. 

Does "Error compiling for (boardname). Have you checked that you have  selected the correct board in Tools -> Board?" add anything? 

I like this option. I’d even go further and add “Error compiling for (board name) on (serial port). Have you checked:
* That you have selected the correct board in the Tools ->Board Menu
* That you have selected the correct port in the Tools ->Port Menu
* That your board is still connected and powered
* That you do not have a short circuit on your board?
* Check <some arduino.cc url> for more tips on troubleshooting

Those last two may be TMI, but they are probably the four most likely causes I see for that error.

t.

Andrew Kroll

unread,
Mar 4, 2016, 1:23:10 AM3/4/16
to devel...@arduino.cc

Too wordy... and most people don't read, which is unfortunate. A popup box with a countdown timer and messages would be best for noobs. Of course, have a way to turn it off for the rest of us, and spit out a terse version instead.

Tom Igoe

unread,
Mar 4, 2016, 1:28:21 AM3/4/16
to devel...@arduino.cc
It probably goes without saying that I am more concerned about the beginners (I find “noobs" to be a dismissive term) than the rest of us. But sure, add all the expert flags you want, just put ‘em in Preferences and out of the way. 

As for wordiness, it’s probably less wordy than the average compiler output, but you may be right. I believe in erring on the side of full sentences in error messages though.  But when you say “output messages”, what do you mean specifically?

t.

andre

unread,
Mar 4, 2016, 1:37:01 AM3/4/16
to devel...@arduino.cc
Hello all

I like the concept, it is always dangerous to do things like this in the sense that you could not possibly cater for every issue. I know amongst others that serial driver et al can cause issues, and in linux port access rights, etc....

This said, an improved list of possible issues, with the most obvious ones at the top, does make sense. One could also put a link in the error, which shows more details. Having to much info is a real problem, nobody bothers to read lines, and lines of output. I am not currently informed about the technology behind the IDE and how easy/possible this might be.

By the way, this is the sort of stuff I would not mind to help with, can do Java, C, C++, know GNU compilers very well and have written boot loaders before.

I think Arduino is an amazing platform, excellent value for money and wow community.

Regards
A

Andrew Kroll

unread,
Mar 4, 2016, 2:19:26 AM3/4/16
to devel...@arduino.cc

I don't find it dismissive whatsoever.

noob

noun

informal

a person who is inexperienced in a particular sphere or activity, especially computing or the use of the Internet.

I think that fits well.

Paul Stoffregen

unread,
Mar 4, 2016, 2:28:53 AM3/4/16
to devel...@arduino.cc
On 03/03/2016 10:17 PM, Tom Igoe wrote:
I like this option. I’d even go further and add “Error compiling for (board name) on (serial port). Have you checked:
* That you have selected the correct board in the Tools ->Board Menu
* That you have selected the correct port in the Tools ->Port Menu
* That your board is still connected and powered
* That you do not have a short circuit on your board?
* Check <some arduino.cc url> for more tips on troubleshooting

Those last two may be TMI, but they are probably the four most likely causes I see for that error.

Maybe some of those would be more appropriate to show when compiling succeeds but uploading fails?


Adrian Godwin

unread,
Mar 4, 2016, 4:29:28 AM3/4/16
to devel...@arduino.cc
I prefer exact information rather than a lot of suggestions, which can be a bit banal, like the Microsoft 'help' that lists a bunch of things that are 'my fault' but miss 'The software has incorrectly guessed the cause of the error and is misleading you'.

Importantly, something you can google. Surprisingly, one of those impenetrable error numbers is actually best for this!
 
The most likely reasons (wrong board selected) are useful, but suggestions like 'That your board is still connected and powered' are a little bit insulting. If there's a popup, perhaps it could have a button (preferred to a link) for 'more suggestions' ?

More usefully, is it possible to put something in the bootloader protocol that identifies the board ?



Tom Igoe

unread,
Mar 4, 2016, 5:37:49 AM3/4/16
to Arduino Developers

I'm glad to know you feel that way. I have heard many developers use the term dismissively of beginners, which is why I make that assumption.

Tom Igoe
--
sent on the go. please forgive any terseness or typos

Tom Igoe

unread,
Mar 4, 2016, 5:39:15 AM3/4/16
to Arduino Developers

Good idea, Paul. I went with the most common reasons for that error that I usually see in the classroom, but breaking them up when the ide can distinguish between them is a good idea.

Tom Igoe
--
sent on the go. please forgive any terseness or typos

Tom Igoe

unread,
Mar 4, 2016, 5:42:20 AM3/4/16
to Arduino Developers

When we can distinguish between the different causes, I agree with you. In my experience, though, that error may have manny causes. But if you've got suggestions for how we can clearly distinguish between them in the ide, let's talk about them.

Yeah, the unplugged line may be going too far. It's surprisingly common as a cause, but maybe it's kinder to have a person notice and deliver that message.

Tom Igoe
--
sent on the go. please forgive any terseness or typos

Stefan Dzisiewski-Smith

unread,
Mar 4, 2016, 5:42:35 AM3/4/16
to devel...@arduino.cc
I like Paul's suggestions too. Even the most experienced of us can sometimes forget to turn a board on / plug it in (be honest..!). It won't hurt my ego, and for a newer user this might help a lot. I can certainly vouch for a lot of support issues I have seen that match all of those patterns - especially selecting Tools -> Port.

S

Mike

unread,
Mar 4, 2016, 6:04:45 AM3/4/16
to devel...@arduino.cc
Perhaps, Stefan, it would be an easy check  if the user presses the compile & load -> button and that board requires a port definition for upload, if a port is undefined, a dialog could prompt for a port.  This may also catch some boards that are not plugged in (but maybe not all).

Stefan Dzisiewski-Smith

unread,
Mar 4, 2016, 6:13:55 AM3/4/16
to devel...@arduino.cc
That sounds good, Mike, although I don't know if dialog prompts are part of the UX design guide for the IDE. Can anyone from Arduino comment on that? The only issue here is that I haven't worked on the Arduino IDE before (and am hardly a Java expert) so a PR from me might be a bit messy and slow coming, unless Paul thinks it can go with his proposed PR. I don't want to pull this thread too far off its original course or highjack Paul's offer of a useful improvement.

S

David Mellis

unread,
Mar 4, 2016, 1:00:31 PM3/4/16
to Arduino Developer's List
I think Paul's original suggestion could be good... I'd be wary of a longer message suggesting that people check to make sure they have the right board selected. Most compiler errors (in my experience) are not caused by having the wrong board selected, so suggesting that as a potential solution seems misleading in most cases.

Peter Feerick

unread,
Mar 4, 2016, 4:49:32 PM3/4/16
to devel...@arduino.cc

I agree. I've been watching the discussion, and I think things are getting a bit too complicated. The initial message just draws you attention to which board is selected as part of the error message. Now we are talking about also having a mile long (!!) list of what could have caused it... which may or may not be relevant. That sounds like a good idea itself to some extent, but what about hiding that behind a 'possible causes' or 'more information' button/link. And also point out that these are just fixes for that type of error, not necessarily *the* fix for 'your' error.

Pete

Paul Stoffregen

unread,
Mar 5, 2016, 4:59:40 PM3/5/16
to devel...@arduino.cc
I've submitted a pull request.  Only 1 line is changed.  :)

https://github.com/arduino/Arduino/pull/4658

One minor point I probably should have mentioned more clearly is this not-very-informative "Error compiling" message appears only when the IDE is unable to highlight any specific line in the editor.  When any line is highlighted, the compiler's error message for that highlighted line is shown.

This generic error usually appears when an incompatible library is used, or when the sketch has #include lines for headers that can't be found.  Those are cases where the cause is much more likely to be the wrong board selected.  Hopefully this helps.

Paul Carpenter

unread,
Mar 6, 2016, 5:28:03 AM3/6/16
to Developers
Yes things are too complicated for listing errors.

Personally "Copy errors messages" would be better as "Copy Errors to New Tab", without having a file name prompt.Often I use another text editor to view the messages.

So many times I see others, especially students, that have multiple errors (often typos), highlighting the first one does not necessarily help fix all the errors
Reply all
Reply to author
Forward
0 new messages