Unverified Commit 8b53b850 authored by Jesse Vincent's avatar Jesse Vincent Committed by GitHub

[skip changelog] Make use of 'avr' as example platform more consistent (#1680)

* Make use of 'avr' as example platform more consistent

It's fairly easy to miss the one line early in the doc that says this text uses 'avr' as an example, leading a reader to possibly believe the documentation hasn't been updated since 'avr' was the only platform choice. Within the doc, the text was a little inconsistent as to how it referred to the avr platform and platform specific tools. This change tries to standardize how we refer to the example platform.

* Fix a couple lint errors.

* Fix prettier lint errors.

* Fix an additional prettier lint error

* Update docs/sketch-build-process.md
Co-authored-by: default avatarper1234 <accounts@perglass.com>
Co-authored-by: default avatarper1234 <accounts@perglass.com>
parent a478b4a8
The process the Arduino development software uses to build a sketch. More useful information can be found in the
[Arduino platform specification](platform-specification.md). Note that the following refers specifically to the build
process for AVR targets. Other architectures will have a similar build process.
process for AVR targets. Other architectures follow a similar build process, but may use other tools and compilers.
## Overview
A number of things have to happen for your Arduino code to get onto the Arduino board. First, the Arduino development
software performs some minor pre-processing to turn your sketch into a C++ program. Next, dependencies of the sketch are
located. It then gets passed to a compiler (avr-gcc), which turns the human readable code into machine readable
located. It then gets passed to a compiler (e.g, `avr-gcc`), which turns the human readable code into machine readable
instructions (or object files). Then your code gets combined with (linked against) the standard Arduino libraries that
provide basic functions like `digitalWrite()` or `Serial.print()`. The result is a single Intel hex file, which contains
the specific bytes that need to be written to the program memory of the chip on the Arduino board. This file is then
......@@ -15,8 +15,8 @@ external programming hardware.
## Pre-Processing
The Arduino development software performs a few transformations to your sketch before passing it to the avr-gcc
compiler:
The Arduino development software performs a few transformations to your sketch before passing it to the compiler (e.g.,
`avr-gcc`):
- All .ino and .pde files in the sketch folder (shown in the Arduino IDE as tabs with no extension) are concatenated
together, starting with the file that matches the folder name followed by the others in alphabetical order. The .cpp
......@@ -157,8 +157,8 @@ its cloud-based nature may make the locations of libraries less obvious.
## Compilation
Sketches are compiled by avr-gcc and avr-g++ according to the variables in the boards.txt file of the selected board's
[platform](platform-specification.md).
Sketches are compiled by architecture-specific versions of `gcc` and `g++` according to the variables in the boards.txt
file of the selected board's [platform](platform-specification.md).
The sketch is built in a temporary directory in the system-wide temporary directory (e.g. /tmp on Linux).
......@@ -185,8 +185,9 @@ the build process will be printed in the console.
## Uploading
Sketches are uploaded by avrdude. The upload process is also controlled by variables in the boards and main preferences
files. See the [Arduino platform specification](platform-specification.md) page for details.
Sketches are uploaded by a platform-specific upload tool (e.g., avrdude). The upload process is also controlled by
variables in the boards and main preferences files. See the [Arduino platform specification](platform-specification.md)
page for details.
If verbose output during upload is enabled, debugging information will be output to the console, including avrdude
command lines and verbose output.
If verbose output during upload is enabled, debugging information will be output to the console, including the upload
tool's command lines and verbose output.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment