The ato
command line interface is the main way to interact with atopile.
The ato
command line interface is the main way to interact with atopile.
The command-line tool has tools to:
There’s a semi-de-facto standard format for running apps from the terminal, including ato
.
app
is the name of the app you’re running.command
is the command; think of it as a “menu option” the app provides.options
are the options for the command, typically zero to many instances of --some-option option-value
.arguments
are just like options, but they only take a value. Their position tells the app which argument they are.Add --help
to the app/command/subcommand to get more information at any point.
Some commands might have subcommands. Think of it like a menu where, from left to right you’re choosing deeper and deeper into the menu.
If an upper command/app accepts options, those options should go right after the app/command, rather than at the end after subcommands.
For example, -v
is a special option, called a “flag,” which doesn’t take a value. Its presence or absence is what matters. It increases the amount of information the compiler prints -> increase its verbosity.
The -v
flag is an app option, so to use it, place it right after the app name.
As a rough overview, here’s what happens when you run ato build
:
This tutorial continues from the quickstart guide.
If you haven’t already, complete it, and then come back here.
With the explanation of ato
code and the build process, it should be a little more clear what’s happening now in the quickstart project.
Here’s a breakdown:
Resistor
module
, named App
.
This is the entry point of the build (see your ato.yaml
).Resistor
value
attribute
This constrains what components the compiler can pick for this resistor.
For picking, the rated resistance must be wholly within the value
attribute. The precise way to say this in more CS terms / what atopile says internally is that the picked resistor’s resistance must be a subset of the quantity interval defined by the value attribute.Suppose the circuit needs a simple voltage divider - and the standard library doesn’t exist containing one pre-made and tested for you.
It’s easy to create your own!
Now, this is, technically, a voltage divider. And the compiler happily builds it, grabbing the right components etc.
But, it’s not a good voltage divider.
To fix that:
Much better! This is a better approach.
Here’s a breakdown:
module
, named VoltageDivider
This means you can trivially have as many VoltageDivider
s as you want, all configured properly with all the same interfaces."""
Power
to expose them.assert
Read these statements as “make sure the following is true.”
The ato
command line interface is the main way to interact with atopile.
The ato
command line interface is the main way to interact with atopile.
The command-line tool has tools to:
There’s a semi-de-facto standard format for running apps from the terminal, including ato
.
app
is the name of the app you’re running.command
is the command; think of it as a “menu option” the app provides.options
are the options for the command, typically zero to many instances of --some-option option-value
.arguments
are just like options, but they only take a value. Their position tells the app which argument they are.Add --help
to the app/command/subcommand to get more information at any point.
Some commands might have subcommands. Think of it like a menu where, from left to right you’re choosing deeper and deeper into the menu.
If an upper command/app accepts options, those options should go right after the app/command, rather than at the end after subcommands.
For example, -v
is a special option, called a “flag,” which doesn’t take a value. Its presence or absence is what matters. It increases the amount of information the compiler prints -> increase its verbosity.
The -v
flag is an app option, so to use it, place it right after the app name.
As a rough overview, here’s what happens when you run ato build
:
This tutorial continues from the quickstart guide.
If you haven’t already, complete it, and then come back here.
With the explanation of ato
code and the build process, it should be a little more clear what’s happening now in the quickstart project.
Here’s a breakdown:
Resistor
module
, named App
.
This is the entry point of the build (see your ato.yaml
).Resistor
value
attribute
This constrains what components the compiler can pick for this resistor.
For picking, the rated resistance must be wholly within the value
attribute. The precise way to say this in more CS terms / what atopile says internally is that the picked resistor’s resistance must be a subset of the quantity interval defined by the value attribute.Suppose the circuit needs a simple voltage divider - and the standard library doesn’t exist containing one pre-made and tested for you.
It’s easy to create your own!
Now, this is, technically, a voltage divider. And the compiler happily builds it, grabbing the right components etc.
But, it’s not a good voltage divider.
To fix that:
Much better! This is a better approach.
Here’s a breakdown:
module
, named VoltageDivider
This means you can trivially have as many VoltageDivider
s as you want, all configured properly with all the same interfaces."""
Power
to expose them.assert
Read these statements as “make sure the following is true.”