Skip to content

[skip changelog] Fix typos in documentation #635

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

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ same folder.
## Running the tests

There are several checks and test suites in place to ensure the code works as
expected but it's also written in a way that's consistent across the whole
codebase. To avoid pushing changes that will cause the CI system to fail, you
can run most of the tests locally.
expected and is written in a way that's consistent across the whole codebase.
To avoid pushing changes that will cause the CI system to fail, you can run most
of the tests locally.

To ensure code style is consistent, run:

Expand Down Expand Up @@ -87,7 +87,8 @@ Being a command line interface, Arduino CLI is heavily interactive and it has to
stay consistent in accepting the user input and providing the expected output
and proper exit codes. On top of this, many Arduino CLI features involve
communicating with external devices, most likely through a serial
port, so unit tests can only put our confidence that the code is working so far.
port, so unit tests can only go so far in giving us confidence that the code is
working.

For these reasons, in addition to regular unit tests the project has a suite of
integration tests that actually run Arduino CLI in a different process and
Expand Down Expand Up @@ -166,7 +167,7 @@ command do:
task docs:serve
```

If you dont' see any error, hit http://127.0.0.1:8000 with your browser.
If you don't see any error, hit http://127.0.0.1:8000 with your browser.

## Pull Requests

Expand Down
11 changes: 5 additions & 6 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
When you run `arduino-cli board list`, your board doesn't show up. Possible causes:

- Your board is a cheaper clone, or
- It mounts a USB2Serial converter like FT232 or CH320: these chips
always reports the same USB VID/PID to the operating system, so the
only thing that we know is that the board mounts that specific
USB2Serial chip, but we don’t know which board is.
- It mounts a USB2Serial converter like FT232 or CH340: these chips
always report the same USB VID/PID to the operating system, so the
only thing we know is that the board mounts that specific
USB2Serial chip, but we don’t know which board that chip is on.

## What's the FQBN string?

For a deeper understanding of how FQBN works, you should understand
Arduino Hardware specification. You can find more information in the
[Arduino platform specification][0].
the [Arduino platform specification][0].


[0]: platform-specification.md
18 changes: 9 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Despite there's no feature parity at the moment, Arduino CLI provides many of
the features you can find in the Arduino IDE, let's see some examples.
Despite the lack of feature parity at the moment, Arduino CLI provides many of
the features you can find in the Arduino IDE. Let's see some examples.

## Before you start

Expand Down Expand Up @@ -44,15 +44,15 @@ Use "arduino-cli core [command] --help" for more information about a command.

Arduino CLI doesn't strictly require a configuration file to work because the
command line interface provides any possible functionality. However, having one
can spare you a lot of typing when issuing a command, so let's create it
right ahead with:
can spare you a lot of typing when issuing a command, so let's go ahead and
create it with:

```sh
$ arduino-cli config init
Config file written: /home/luca/.arduino15/arduino-cli.yaml
```

If you inspect `arduino-cli.yaml` contents, you'll find out the available
If you inspect the contents of `arduino-cli.yaml`, you'll find the available
options with their respective default values.

## Create a new sketch
Expand Down Expand Up @@ -104,7 +104,7 @@ $ arduino-cli core update-index
Updating index: package_index.json downloaded
```

After connecting the board to your PCs by using the USB cable, you should be
After connecting the board to your PC by using the USB cable, you should be
able to check whether it's been recognized by running:

```sh
Expand Down Expand Up @@ -198,8 +198,8 @@ ID Version Name
esp8266:esp8266 2.5.2 esp8266
```

Alternatively, you can pass a link to the the additional package index file with
the `--additional-urls` option, that has to be specified every time and for every
Alternatively, you can pass a link to the additional package index file with the
`--additional-urls` option, that has to be specified every time and for every
command that operates on a 3rd party platform core, for example:

```sh
Expand All @@ -213,7 +213,7 @@ esp8266:esp8266 2.5.2 esp8266

## Compile and upload the sketch

To compile the sketch you run the `compile` command passing the proper FQBN
To compile the sketch you run the `compile` command, passing the proper FQBN
string:

```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.
You can download the latest version of the pre-built binaries for the supported
platforms from the [release page](https://github.com/arduino/arduino-cli/releases)
or following the links in the following table. Once downloaded, extract the
binary `arduino-cli` into a directory that's is in your `PATH`.
binary `arduino-cli` into a directory that is in your `PATH`.

Platform | | |
--------- | ------------------ | ------------------ |
Expand Down
60 changes: 29 additions & 31 deletions docs/library-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is the specification for the 3rd party library format to be used with Ardui
* rev.2.1 will be implemented starting from version 1.6.10
* rev.2.2 will be implemented starting from version 1.8.10

This new library format is intended to be used in tandem with the Arduino IDE"s **Library Manager**, available since version 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface. It doesn't yet take care of dependencies between libraries.
More information about how Library Manager works are available [here](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ).
This new library format is intended to be used in tandem with the Arduino IDE's **Library Manager**, available since version 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface. It doesn't yet take care of dependencies between libraries.
More information about how Library Manager works is available [here](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ).

Arduino IDE 1.5.x+ supports multiple microcontroller architectures (e.g. AVR, SAM, etc), meaning that libraries may need to work on multiple architectures. The new 1.5 library format doesn’t contain special support for cross-architecture libraries, but it does provide a preprocessor based mechanism for libraries to target sections of code to specific architectures.

Expand All @@ -28,31 +28,29 @@ This file allows the *Library Manager* to search and install a library and its d

The library.properties file is a key=value properties list. Every field in this file is UTF-8 encoded. Unless noted otherwise below, **all fields are required**. The available fields are:

* **name** - the name of the library. Library names must contain only basic letters (`A`-`Z` or `a`-`z`) and numbers (`0`-`9`), spaces (` `), underscores (`_`), dots (`.`) and dashes (`-`). It cannot start or end with a space, and also it cannot start with a number. Note that libraries with a `name` value starting with `Arduino` will no longer be allowed [addition to the Library Manager index](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ) as these names are now reserved for official Arduino libraries.
* **version** - version of the library. Version should be [semver](http://semver.org/) compliant. 1.2.0 is correct; 1.2 is accepted; r5, 003, 1.1c are invalid
* **author** - name/nickname of the authors and their email addresses (not mandatory) separated by comma ","
* **maintainer** - name and email of the maintainer
* **sentence** - a sentence explaining the purpose of the library
* **paragraph** - a longer description of the library. The value of **sentence** always will be prepended, so you should start by writing the second sentence here
* **category** - (defaults to `Uncategorized`) if present, one of these:
* Display
* Communication
* Signal Input/Output
* Sensors
* Device Control
* Timing
* Data Storage
* Data Processing
* Other
* **url** - the URL of the library project, for a person to visit. For example, the library's GitHub page. This is used for the "More info" links in Library Manager
* **architectures** - (defaults to `*`) a comma separated list of architectures supported by the library. If the library doesn’t contain architecture specific code use `*` to match all architectures. This field is used as one factor in determining priority when multiple libraries match an `#include` directive and to provide a warning message when the library is compiled for a board of an architecture that doesn't match any on the list.
* **depends** - **(available from Arduino IDE 1.8.10)** (optional) a comma-separated list of dependencies (libraries that are needed to build the current library). Library Manager will offer to install the dependencies during installation of the library. Since spaces are allowed in the `name` of a library, but not commas, you can refer to libraries containing spaces in the name without ambiguity for example:

`depends=Very long library name, Another library with long-name`

* **dot_a_linkage** - **(available from Arduino IDE 1.6.0 / arduino-builder 1.0.0-beta13)** (optional) when set to `true`, the library will be compiled using a .a (archive) file. First, all source files are compiled into .o files as normal. Then instead of including all .o files in the linker command directly, all .o files are saved into a .a file, which is then included in the linker command. [1.5 format library folder structure](#layout-of-folders-and-files) is required.
* **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files to be added to the sketch as `#include <...>` lines. This property is used with the "Include library" command in the IDE. If the `includes` property is missing all the headers files (.h) on the root source folder are included.
* **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) set to `true` to allow the use of .a (archive) and .so (shared object) files. The .a/.so file must be located at `src/{build.mcu}` where `{build.mcu}` is the architecture name of the target the file was compiled for. Ex: `cortex-m3` for the Arduino DUE. The static library should be linked as an ldflag.
* **name** - the name of the library. Library names must contain only basic letters (`A`-`Z` or `a`-`z`) and numbers (`0`-`9`), spaces (` `), underscores (`_`), dots (`.`) and dashes (`-`). It cannot start or end with a space, and also it cannot start with a number. Note that libraries with a `name` value starting with `Arduino` will no longer be allowed [addition to the Library Manager index](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ) as these names are now reserved for official Arduino libraries.
* **version** - version of the library. Version should be [semver](http://semver.org/) compliant. 1.2.0 is correct; 1.2 is accepted; r5, 003, 1.1c are invalid
* **author** - name/nickname of the authors and their email addresses (not mandatory) separated by comma ","
* **maintainer** - name and email of the maintainer
* **sentence** - a sentence explaining the purpose of the library
* **paragraph** - a longer description of the library. The value of **sentence** always will be prepended, so you should start by writing the second sentence here
* **category** - (defaults to `Uncategorized`) if present, one of these:
* Display
* Communication
* Signal Input/Output
* Sensors
* Device Control
* Timing
* Data Storage
* Data Processing
* Other
* **url** - the URL of the library project, for a person to visit. For example, the library's GitHub page. This is used for the "More info" links in Library Manager
* **architectures** - (defaults to `*`) a comma separated list of architectures supported by the library. If the library doesn’t contain architecture specific code use `*` to match all architectures. This field is used as one factor in determining priority when multiple libraries match an `#include` directive and to provide a warning message when the library is compiled for a board of an architecture that doesn't match any on the list.
* **depends** - **(available from Arduino IDE 1.8.10)** (optional) a comma-separated list of dependencies (libraries that are needed to build the current library). Library Manager will offer to install the dependencies during installation of the library. Since spaces are allowed in the `name` of a library, but not commas, you can refer to libraries containing spaces in the name without ambiguity for example:<br>
`depends=Very long library name, Another library with long-name`
* **dot_a_linkage** - **(available from Arduino IDE 1.6.0 / arduino-builder 1.0.0-beta13)** (optional) when set to `true`, the library will be compiled using a .a (archive) file. First, all source files are compiled into .o files as normal. Then instead of including all .o files in the linker command directly, all .o files are saved into a .a file, which is then included in the linker command. [1.5 format library folder structure](#layout-of-folders-and-files) is required.
* **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files to be added to the sketch as `#include <...>` lines. This property is used with the "Include library" command in the IDE. If the `includes` property is missing, all the header files (.h) on the root source folder are included.
* **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) set to `true` to allow the use of .a (archive) and .so (shared object) files. The .a/.so file must be located at `src/{build.mcu}` where `{build.mcu}` is the architecture name of the target the file was compiled for. Ex: `cortex-m3` for the Arduino DUE. The static library should be linked as an ldflag.
* **ldflags** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) the linker flags to be added. Ex: `ldflags=-lm`

Example:
Expand Down Expand Up @@ -84,7 +82,7 @@ For 1.5.x+-only libraries, the source code resides in the **src** folder. For ex
Servo/src/Servo.h
Servo/src/Servo.cpp

The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the "Tools > Import Library" menu), an #include statement will be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder.
The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the "Sketch > Include Library" menu), an `#include` statement will be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder.

For backward compatibility with Arduino 1.0.x, the library author may opt to place source code into the root folder, instead of the folder called **src**. In this case the 1.0 library format is applied and the source code is searched from the **library root folder** and the **utility** folder, for example:

Expand Down Expand Up @@ -115,7 +113,7 @@ A list of keywords for the library may be specified in a file named keywords.txt

Servo/keywords.txt

An example keywords file:
An example keywords.txt file:
```
# Syntax Coloring Map For ExampleLibrary

Expand All @@ -129,7 +127,7 @@ doSomething KEYWORD2

# Constants (LITERAL1)
```
This keywords file would cause the Arduino IDE to highlight `Test` as a DataType, and `doSomething` as a method / function.
This file would cause the Arduino IDE to highlight `Test` as a DataType, and `doSomething` as a method / function.

#### keywords.txt format
keywords.txt is formatted in four fields which are separated by a single true tab (not spaces):
Expand Down Expand Up @@ -183,7 +181,7 @@ A hypothetical library named "Servo" that adheres to the specification follows:

## Working with multiple architectures

In 1.5.x+, libraries placed in the user’s sketchbook folder (in the libraries/ subfolder) will be made available for all boards, which may include multiple different processor architectures. To provide architecture-specific code or optimizations, library authors can use the ARDUINO_ARCH_XXX preprocessor macro (#define), where XXX is the name of the architecture (as determined by the name of the folder containing it), e.g. ARDUINO_ARCH_AVR will be defined when compiling for AVR-based boards. For example,
In 1.5.x+, libraries placed in the user’s sketchbook folder (in the libraries/ subfolder) will be made available for all boards, which may include multiple different processor architectures. To provide architecture-specific code or optimizations, library authors can use the `ARDUINO_ARCH_XXX` preprocessor macro (`#define`), where XXX is the name of the architecture (as determined by the name of the folder containing it), e.g. `ARDUINO_ARCH_AVR` will be defined when compiling for AVR-based boards. For example,

#if defined(ARDUINO_ARCH_AVR)
// AVR-specific code
Expand Down
Loading