Skip to content

Commit f1ac2a0

Browse files
authored
Merge branch 'main' into blog-package
2 parents b07eab4 + dc55b7b commit f1ac2a0

File tree

83 files changed

+2734
-2685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2734
-2685
lines changed

docs/developer/developer-eclipse-setup-with-oomph.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Hello World.
109109

110110
This should print "Hello World".
111111

112-
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>).
112+
We strongly recommend browsing the [integration tests](regression-tests.mdx), which provide a concise overview of the capabilities of Lingua Franca.
113113

114114
## Working on the Lingua-Franca Compiler
115115

docs/embedded/arduino.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Arduino
33
description: Developing LF Programs on Arduino.
44
---
55

6-
# Overview
6+
## Overview
77

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

16-
## Prerequisites
16+
### Prerequisites
1717

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

25-
# Writing a simple Arduino Program
25+
## Writing a simple Arduino Program
2626

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

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

59-
## Platform Options
59+
### Platform Options
6060

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

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

80-
### Baud rate of the serial port
80+
#### Baud rate of the serial port
8181

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

87-
# Building
87+
## Building
8888

8989
In order to have `arduino-cli` compile the generated sketch file, a `board` must
9090
be specified. If no `board` is set, `lfc` will run in `no-compile` mode, meaning
@@ -112,7 +112,7 @@ If you specify your FQBN under `board` in the `platform` target property, `lfc`
112112
- for threaded programs (`arduino:mbed` boards), run:
113113
`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"`
114114

115-
# Flashing
115+
## Flashing
116116

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

docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ The reactor-oriented programming paradigm is informally described via the follow
2525
8. _Concurrency_ — Dependencies between reactions are explicitly declared in a Lingua Franca program, and reactions that are not dependent on one another can be executed in parallel on a multi-core machine. If the target provides a support for federated execution, then execution can also be distributed across networks.
2626

2727
## Getting Started
28-
To get started with Lingua Franca, [set up a development environment](./installation.md) and learn how to write [a first reactor](./writing-reactors/a-first-reactor.mdx). There are also a number of useful [tutorial videos](./tutorial-videos.mdx) available.
28+
To get started with Lingua Franca, [set up a development environment](./installation.md) and learn how to write [a first reactor](./writing-reactors/a-first-reactor.mdx). There are also a number of potentially useful [videos](./videos.mdx) available.

docs/legacy_routing.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
export default [
22
{
3-
"to": "/docs/tutorial-videos",
3+
"to": "/docs/videos",
44
"from": "/docs/handbook/tutorial-video"
55
},
6+
{
7+
"to": "/docs/videos",
8+
"from": "/docs/tutorial-videos"
9+
},
610
{
711
"to": "/docs/",
812
"from": "/docs/handbook/overview"

docs/reference/target-declaration.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ A target specification may have optional parameters, the names and values of whi
2828
- [**build-type**](#build-type): One of Debug (the default), Release, RelWithDebInfo and MinSizeRel.
2929
- [**cargo-dependencies**](#cargo-dependencies): (Rust only) list of dependencies to include in the generated Cargo.toml file.
3030
- [**cargo-features**](#cargo-features): (Rust only) List of string names of features to include.
31-
- [**cmake-include**](#cmake): List of paths to cmake files to guide compilation.
31+
- [**cmake-include**](#cmake-include): List of paths to cmake files to guide compilation.
3232
- [**compiler**](#compiler): A string giving the name of the target language compiler to use.
33-
- [**compiler-flags**](#compiler-flags): An arrays of strings giving options to be passed to the target compiler.
3433
- [**docker**](#docker): A boolean to generate a Dockerfile.
3534
- [**external-runtime-path**](#external-runtime-path): Specify a pre-compiled external runtime library located to link to instead of the default.
3635
- [**export-dependency-graph**](#export-dependency-graph): To export the reaction dependency graph as a dot graph (for debugging).
@@ -44,7 +43,7 @@ A target specification may have optional parameters, the names and values of whi
4443
- [**runtime-version**](#runtime-version): Specify which version of the runtime system to use.
4544
- [**rust-include**](#rust-include): (Rust only) A set of Rust modules in the generated project.
4645
- [**scheduler**](#scheduler): (C only) Specification of the scheduler to use.
47-
- [**single-file-project**](#single-file-project): (Rust only) If true, enables [single-file project layout](#single-file-layout).
46+
- [**single-file-project**](#single-file-project): (Rust only) If true, enables [single-file project layout](target-language-details/?target-languages=rs#file-layout).
4847
- [**single-threaded**](#single-threaded): Specify to not use multithreading.
4948
- [**timeout**](#timeout): A time value (with units) specifying the logical stop time of execution. See [Termination](../writing-reactors/termination.mdx).
5049
- [**workers**](#workers): If using multiple threads, how many worker threads to create.
@@ -161,7 +160,7 @@ A command to execute after code generation instead of the default compile comman
161160
- `LF_CURRENT_WORKING_DIRECTORY`: The directory in which the command is invoked.
162161
- `LF_SOURCE_DIRECTORY`: The directory containing the .lf file being compiled.
163162
- `LF_PACKAGE_DIRECTORY`: The directory for the root of the project or package (normally the directory above the `src` directory).
164-
- `LF_SOURCE_GEN_DIRECTORY`: The directory in which generated files are placed.
163+
- `LF_SOURCE_GEN_DIRECTORY`: The directory in which generated files and any files in the [files](#files) target directive are placed.
165164
- `LF_BIN_DIRECTORY`: The directory into which to put binaries.
166165

167166
The command will be executed in the same directory as the `.lf` file being compiled. For example, if you specify
@@ -400,6 +399,7 @@ This target does not support the `files` option.
400399
</ShowIf>
401400
<ShowIf c py>
402401
The `files` target parameter specifies array of files or directories to be copied to the directory that contains the generated sources.
402+
The full path to that directory is available in C code via the `LF_SOURCE_GEN_DIRECTORY` macro.
403403

404404
<ShowOnly c>
405405
```lf-c
@@ -645,7 +645,7 @@ Any errors in command-line arguments result in printing the above information. T
645645

646646
### Custom Command-Line Arguments
647647

648-
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).
648+
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).
649649

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

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

738-
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)).
738+
If the main reactor declares parameters, these parameters will appear as additional CLI options that can be specified when invoking the binary.
739739
</ShowIf>
740740
<ShowIf py>
741741
The Python target does not currently support any command-line arguments. You must specify properties as target parameters.

0 commit comments

Comments
 (0)