Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion docs/developer/developer-eclipse-setup-with-oomph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Hello World.

This should print "Hello World".

We strongly recommend browsing the system tests, which provide a concise overview of the capabilities of Lingua Franca. You can set up a project in the IDE for this using [these instructions](<../developer/regression-tests.mdx#browsing-and-editing-examples-in-the-lf-ide>).
We strongly recommend browsing the [itegration tests](regression-tests.mdx), which provide a concise overview of the capabilities of Lingua Franca.

## Working on the Lingua-Franca Compiler

Expand Down
14 changes: 7 additions & 7 deletions docs/embedded/arduino.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Arduino
description: Developing LF Programs on Arduino.
---

# Overview
## Overview

To run Lingua Franca on an Arduino-compatible microcontroller, you can use the
`C` target with the `platform` target property set to `arduino`. The Lingua
Expand All @@ -13,7 +13,7 @@ To flash the compiled sketch onto a board, you need specify a Fully Qualified
Board Name (FQBN) as well as the port to which your board is connected. On this
page, we explain exactly how to do this.

## Prerequisites
### Prerequisites

- You need a development system that runs on macOS or Linux (there is currently no Windows support).
- [Arduino CLI](https://arduino.github.io/arduino-cli/) must be installed on your development system. Confirm that your installation works by running:
Expand All @@ -22,7 +22,7 @@ page, we explain exactly how to do this.
arduino-cli version
```

# Writing a simple Arduino Program
## Writing a simple Arduino Program

The most basic Arduino program (Blink) can be defined in LF like so:

Expand Down Expand Up @@ -56,7 +56,7 @@ can invoke Arduino library functions, just like one would do in the definition
of an Arduino `loop()`. For any setup that might be needed at the beginning of
execution, a reaction triggered by the built-in `startup` trigger can be used.

## Platform Options
### Platform Options

The `platform` property can also be used so specify more details. Along with `name: "arduino"`,
you can specify which `board`, `port`, and `baud-rate` you are using. If you want the program
Expand All @@ -77,14 +77,14 @@ target C {

The `board` is necessary for [building](#building) and the `port` is necessary for [flashing](#flashing).

### Baud rate of the serial port
#### Baud rate of the serial port

All Arduino boards have at least one serial port (also known as a UART or
USART), and some have several. By default, Lingua Franca will assume a default
baud rate of 9600. This parameter is tunable by adjusting the `baud-rate`
parameter in platform options.

# Building
## Building

In order to have `arduino-cli` compile the generated sketch file, a `board` must
be specified. If no `board` is set, `lfc` will run in `no-compile` mode, meaning
Expand Down Expand Up @@ -112,7 +112,7 @@ If you specify your FQBN under `board` in the `platform` target property, `lfc`
- for threaded programs (`arduino:mbed` boards), run:
`arduino-cli compile -b [FQBN] --build-property compiler.c.extra_flags="-DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10" --build-property compiler.cpp.extra_flags="-DPLATFORM_ARDUINO -DINITIAL_EVENT_QUEUE_SIZE=10 -DINITIAL_REACT_QUEUE_SIZE=10"`

# Flashing
## Flashing

Arduino's can be flashed via USB. To find the port oto which your device is connected, run the following command:

Expand Down
7 changes: 3 additions & 4 deletions docs/reference/target-declaration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ A target specification may have optional parameters, the names and values of whi
- [**build-type**](#build-type): One of Debug (the default), Release, RelWithDebInfo and MinSizeRel.
- [**cargo-dependencies**](#cargo-dependencies): (Rust only) list of dependencies to include in the generated Cargo.toml file.
- [**cargo-features**](#cargo-features): (Rust only) List of string names of features to include.
- [**cmake-include**](#cmake): List of paths to cmake files to guide compilation.
- [**cmake-include**](#cmake-include): List of paths to cmake files to guide compilation.
- [**compiler**](#compiler): A string giving the name of the target language compiler to use.
- [**compiler-flags**](#compiler-flags): An arrays of strings giving options to be passed to the target compiler.
- [**docker**](#docker): A boolean to generate a Dockerfile.
- [**external-runtime-path**](#external-runtime-path): Specify a pre-compiled external runtime library located to link to instead of the default.
- [**export-dependency-graph**](#export-dependency-graph): To export the reaction dependency graph as a dot graph (for debugging).
Expand Down Expand Up @@ -646,7 +645,7 @@ Any errors in command-line arguments result in printing the above information. T

### Custom Command-Line Arguments

User-defined command-line arguments may be created by giving the main reactor [parameters](#using-parameters). Assigning the main reactor a parameter of type `string`, `number`, `boolean`, or `time` will add an argument with corresponding name and type to the generated program's command-line-interface. Custom arguments will also appear in the generated program's usage guide (from the `--help` option). If the generated program is executed with a value specified for a custom command-line argument, that value will override the default value for the corresponding parameter. Arguments typed `string`, `number`, and `boolean` are parsed in the expected way, but `time` arguments must be specified on the command line like the `--timeout` property as `'<duration> <units>'` (in quotes).
User-defined command-line arguments may be created by giving the main reactor [parameters](../writing-reactors/parameters-and-state-variables.mdx#parameter-declaration). Assigning the main reactor a parameter of type `string`, `number`, `boolean`, or `time` will add an argument with corresponding name and type to the generated program's command-line-interface. Custom arguments will also appear in the generated program's usage guide (from the `--help` option). If the generated program is executed with a value specified for a custom command-line argument, that value will override the default value for the corresponding parameter. Arguments typed `string`, `number`, and `boolean` are parsed in the expected way, but `time` arguments must be specified on the command line like the `--timeout` property as `'<duration> <units>'` (in quotes).

Note: Custom arguments may not have the same names as standard arguments like `timeout` or `keepalive`.

Expand Down Expand Up @@ -736,7 +735,7 @@ The generated C++ program understands the following command-line arguments, each
- `-w, --workers <n>`: Use n worker threads for executing reactions.
- `--help`: Print the above information.

If the main reactor declares parameters, these parameters will appear as additional CLI options that can be specified when invoking the binary (see [Using Parameters](#using-parameters)).
If the main reactor declares parameters, these parameters will appear as additional CLI options that can be specified when invoking the binary.
</ShowIf>
<ShowIf py>
The Python target does not currently support any command-line arguments. You must specify properties as target parameters.
Expand Down
Loading
Loading