When the compiled size of a sketch exceeds the available flash or RAM on the board, the error message includes a link to
a troubleshooting guide:
Sketch uses 16110 bytes (112%) of program storage space. Maximum is 14336 bytes.
Global variables use 685 bytes (66%) of dynamic memory, leaving 339 bytes for local variables. Maximum is 1024 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
When an upload fails, the error message includes a link to a troubleshooting guide:
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
http://www.arduino.cc/en/Guide/Troubleshooting was recently replaced with the Arduino Help Center. Even though that URL
redirects to the Help Center, it only goes to the home page, leaving the user to hunt for the relevant article.
A better user experience is provided by linking directly to the relevant content in the Help Center.
Previously rescanLibraries() was automatically called internally in
setLibrariesFolder(). This lead to double calls to rescanLibraries()
when setLibrariesFolder() was used in combination with an explicit
call to rescanLibraries().
This commit adds a new method setLibrariesFoldersAndRescan(..) and
removes the internal call to rescanLibraries() from setLibrariesFolder().
The existing setLibrariesFolder()+rescanLibraries() combos have been
replaced with setLibrariesFoldersAndRescan().
Fix#10228
Normally, init is only called once during startup, so this does not add
anything. However, when running the testsuite, PreferencesData could be
initialized multiple times in a single test run. To prevent preferences
from a previous test from interfering with subsequent tests, always
start with a clean slate when calling init.
According to JEP223, Java versions do not include trailing zero
elements. This means that e.g. Java 14.0.0 reports its version just as
"14". The changed code part expected at least three characters, so it
failed to start on such "zero-zero" Java releases. The evaluated java
version was not used anywhere, so the code block was removed.
Otherwise it may happen some weird sorting when untraslated and
translated labels are sorted together:
Arduino megaAVR Boards
Arduino nRF52 Board
ESP32 Arduino
ESP8266 Modules
Schede Arduino AVR <-- the localized string falls to the bottom
Also there is no way for 3rd party boards developers to actually provide
a translation, so let's just remove them.
This fixes a problem with the Serial UTF-8 decoder. This decoding moves
data from char[] buf, into a ByteBuffer inFromSerial, then decodes them
into a CharBuffer outToMessage and converts to a char[] to pass on.
When the buf read contained just over a full buffer worth of bytes and
contained some multi-byte characters, a situation could arise where two
decodes were needed to fill up outToMessage, leaving some data in
inFromSerial. If in this case no data would be left in buf, decoding
would stop until more data came in from serial.
This commit fixes this problem by:
- Changing the outer loop to continue running when buf is empty, but
inFromSerial is not.
- Changing the inner loop to run at least once (so it runs when buf is
empty, but inFromSerial is no).
- Breaking out of the outer loop when no characters were produced (this
handles the case where only an incomplete UTF-8 character remains in
inFromSerial, which would otherwise prevent the loop from
terminating.
- Removes a `if (outToMessage.hasRemaining()` check that is now
necessarily true if the break was not done.
This fixes#9808.
Fixes https://github.com/arduino/Arduino/issues/9785 and probably many others
This commit strongly simplyfies the serial list code
Pluggable discovery introduced a bug since BoardPort.toString() started reporting only the name of the port, not the complete name_vid_pid needed to match liblistserial output.
Adding .toCompleteString() almost solves the bogus disconnection part alone, but resolveDeviceByVendorIdProductId() uses "0x" prefixes VID/PID, breaking it again.
In addition, all the logic used to match a board with its bootloader (to obtain a serial number on 32u4 boards) has been completely removed since it is currently useless (and unused).
There was an error in the following constants:
PREF_PROXY_AUTO_USERNAME = "proxy.manual.username"
PREF_PROXY_AUTO_PASSWORD = "proxy.manual.password"
they should be set to "auto" and not "manual":
PREF_PROXY_AUTO_USERNAME = "proxy.auto.username"
PREF_PROXY_AUTO_PASSWORD = "proxy.auto.password"
Changing the constants to the correct value now will fix the problem for
future installations of the IDE but will produce an annoying side-effect
for users upgrading from previous version of the IDE: they will lose
their saved user and pass (because it was saved as "proxy.manual.*")
and the IDE will suddenly stop working without any clear reason.
To avoid this I've left the value to "proxy.manual.*" and removed
the distinction from AUTO and MANUAL, so now we have only:
PREF_PROXY_USERNAME = "proxy.manual.username"
PREF_PROXY_PASSWORD = "proxy.manual.password"
The corresponding textbox in the preference dialog will be filled based on
the PROXY_TYPE selection.
Improve Codacy PR quality requirements:
Fields should be declared at the top of the class, before any method
declarations, constructors, initializers or inner classes.
When transforming compiler errors (to make filenames more friendly), it
would match "fatal error" or "error" but then always reconstruct as
"error", modifying the compiler error in a way that is not intended.
This commit fixes that, as well as the previous hardcoding of the
"error: " prefix when rebuilding the error message, by capturing this
entire prefix and simply reproducing it in the resulting error message.
Error messages are detected and parsed using a regex. Part of this regex
matches the optional column number.
The code that handled this assumed that a missing column would result in
less elements in the matches array, but a regex always results in one
element per set of parenthesis in the regex, which will be null if no
capture was made for that element.
In practice, this meant that if no column was present in the error
message, a NullPointerException would be raised. Furthermore, gcc 9
seems to have started outputting omitting column numbers (instead of
printing 0) for some errors (such as unterminated #ifdef), which exposed
this problem.
This commit fixes this by simply using the fixed match numbers to take
apart the regex match, and by checking for a null column number (all
other captures are non-optional, so no need to check there).