Skip to content

[docs] Make use of 'avr' as example platform more consistent #1680

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 5 commits into from
Mar 4, 2022
Merged
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
21 changes: 11 additions & 10 deletions docs/sketch-build-process.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
Expand All @@ -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
Expand Down Expand Up @@ -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).

Expand All @@ -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.