On later versions of avr-libc, prog_char is deprecated. In 0acebeeff4
the one occurence of prog_char was replaced by "char PROGMEM", which is
not entirely correct (PROGMEM is supposed to be an attribute on a
variable, not on a type, even though this is how things work in older
libc versions). However, in 1130fede3a a few new occurences of
prog_char are introduced, which break compilation on newer libc versions
again.
This commit changes all these pointer types to use the PGM_P macro from
<avr/pgmspace.h>. This macro is just "const char *" in newer libc
versions and "const prog_char *" in older versions, so it should always
work.
References #795
The new function just calls Print::write(const uint8_t *, size_t), but
this allows writing out a buffer of chars (without having to learn about
casts).
This adds a description of commandline options, files used and some
preferences in proper Unix manpage format. It is written in asciidoc,
which can easily be converted to both a native troff manpage, or HTML
(the latter can be done by github on-demand).
This file is not installed by the ant build, but is intended for use by
Linux distributions.
The actual file was taken from the Debian package, version
1:1.0.5+dfsg2-1 and is licensed under the GPL-2+. The GenericName,
Comment and Categories fields were changed to better reflect the Arduino
program and Desktop specification.
This file is not installed by the ant build, but is intended for use by
Linux distributions.
The actual file was taken from the Debian package, version
1:1.0.5+dfsg2-1 and is licensed under the GPL-2+. It was only modified
to remove a FIXME comment that is no longer relevant.
These are Arduino icons in various formats that can be used by
redistributors in menus etc.
These icons were taken from the Debian package, version 1:1.0.5+dfsg2-1.
According to the copyright file in there, all icons are licensed under
the GPL-2+.
Previous commits made all failures return 1, even though originally an
unknown sketch file would return 2. This restores the previous behaviour
and adds return code 3 to mean invalid options specified.
The return codes are now:
0: Success
1: Build failed or upload failed
2: Sketch not found
3: Invalid commandline options
These are intended to be ran from the commandline, so showing the GUI
doesn't make so much sense.
This is not quite the perfect solution yet, because an Editor object and
all kinds of GUI objects are still created. This commit only prevents
them from being visible, which is a nice first step, but not quite
pretty yet. However, to do it properly, some code should be moved out of
the Editor class, so that's a bit more work.
Additionally, any messages shown with Base::showError and friends still
create a popup, they probably shouldn't do this either.
When System.(out|err).print was used before there was a visible
EditorConsole, the message was written to the stderr/stdout by this
instead of the EditorConsole. However, the write(data, offset, length)
version would not pass on its offset and length parameters to the
stdout/stderr stream, causing (parts of) a message to be printed
multiple times.
This commit makes sure the parameters are all properly passed to the
real stream.
For some reason the write(int) and write(byte[], int, int) methods in
PrintStream do not throw an IOException like the write(byte[]) version,
so the try block has to go.
Previously, a full cleanup of the work directory (and thus a full
rebuild) was done on the first build after:
- startup, or
- a change in the board or board suboption.
This did not cooperate nicely with commandline compilation using
--verify. Using the build.path option a persistent build path could be
used, but the actual files in that path would never be reused.
Now, each build saves the preferences used for building in a file
"buildprefs.txt" inside the build directory. Subsequent builds will read
this file to see if any build options changed and re-use the existing
files if the build options are identical.
Because the main .cpp file is not handled by Compiler::build, but by
Sketch::preprocess, it is still always regenerated, even if the Sketch
itself didn't change. This could be fixed later, though it is probably
not a problem.
When writing buildprefs.txt, only the build preferences starting with
"build.", "compiler." or "recipes." are used. These should be enough to
ensure files are always rebuilt when needed (probably also sometimes
when not needed, when change build.verbose for example). Using all build
preferences would cause the files to be rebuild too often, and because
of last.ide.xxx.daterun, they would still rebuild on _every_
invocation... This approach is perhaps not ideal, but improving it would
require putting more structure in the preferences instead of piling them
all together into the build preferences.
Because of this new mechanism, the old
buildSettingsChanged()/deleteFilesOnNextBuild could be removed.