Skip to content

Commit

Permalink
Add convenience script to call the COSMOS plugin install script with …
Browse files Browse the repository at this point in the history
…its first argument from the main assembly directory
  • Loading branch information
Jbsco committed May 31, 2024
1 parent 5ebd9ab commit baca563
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/assembly/linux/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ $ redo cosmos_config

This generates the plugin configuration file and its respective command and telemetry configurations in the `adamant_example/src/assembly/linux/build/cosmos/plugin/` directory. The plugin configuration template file is located in the `adamant_example/src/assembly/linux/build/cosmos/template/` directory, and should be reviewed to ensure the interface and required protocols are correct. By default, this template applies settings specific to this example and should be modified for other configurations.

A helper script, which takes the relative paths to the Adamant assembly yaml file and COSMOS install directory as arguments, is provided to copy the plugin configuration files, and any custom protocols used by the configuration, to the correct directories. If the COSMOS and Adamant example project directories are adjacent, complete the configuration by running:
A helper script, which takes the relative path from the top level of the assembly to the COSMOS install directory as an argument, is provided to copy the plugin configuration files, and any custom protocols used by the configuration, to the correct directories. If the COSMOS and Adamant example project directories are adjacent, complete the configuration by running:

```
$ cd adamant_example/gnd/cosmos
$ ./install_cosmos_plugin.sh ../../src/assembly/linux/linux_example.assembly.yaml ../../../cosmos-project
$ cd adamant_example/src/assembly/linux/main
$ ./install_cosmos_plugin.sh cosmos-project
```

The plugin can now be compiled. Next, run:
Expand Down
12 changes: 12 additions & 0 deletions src/assembly/linux/main/install_cosmos_plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

#
# This is a convenience script that calls a script of the same name in gnd/cosmos with the correct first argument for this assembly
# The second argument should be the relative path from the top directory of the example assembly to the COSMOS directory.
# Ex. `./install_cosmos_plugin.sh cosmos-project` if COSMOS is adjacent to adamant_example

cosmos_dir=$1
assembly_yaml='linux_example.assembly.yaml'
cd ../../../../gnd/cosmos
./install_cosmos_plugin.sh ../../src/assembly/linux/$assembly_yaml ../../../$cosmos_dir
cd - >/dev/null
10 changes: 5 additions & 5 deletions src/assembly/pico/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ Variable checksum_parameter_name Checksum
# Variable port_w 2003
# Variable port_r 2003
# If serial:
Variable port_w /dev/ttyACM0
Variable port_r /dev/ttyACM0
Variable port_w /dev/tty0
Variable port_r /dev/tty0
Target Linux_Example <%= linux_example_target_name %>
# TCP example interface:
Expand All @@ -209,11 +209,11 @@ Interface <%= linux_example_target_name %>_INT serial_interface.rb <%= port_w %>
Protocol Write cmd_sync_checksum.rb <%= checksum_parameter_name %>
```

A helper script, which takes the relative paths to the Adamant assembly yaml file and COSMOS install directory as arguments, is provided to copy the plugin configuration files, and any custom protocols used by the configuration, to the correct directories. If the COSMOS and Adamant example project directories are adjacent, complete the configuration by running:
A helper script, which takes the relative path from the top level of the assembly to the COSMOS install directory as an argument, is provided to copy the plugin configuration files, and any custom protocols used by the configuration, to the correct directories. If the COSMOS and Adamant example project directories are adjacent, complete the configuration by running:

```
$ cd adamant_example/gnd/cosmos
$ ./install_cosmos_plugin.sh ../../src/assembly/pico/pico_example.assembly.yaml ../../../cosmos-project
$ cd adamant_example/src/assembly/pico/main
$ ./install_cosmos_plugin.sh cosmos-project
```

The plugin can now be compiled. Next, run:
Expand Down
12 changes: 12 additions & 0 deletions src/assembly/pico/main/install_cosmos_plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

#
# This is a convenience script that calls a script of the same name in gnd/cosmos with the correct first argument for this assembly
# The second argument should be the relative path from the top directory of the example assembly to the COSMOS directory.
# Ex. `./install_cosmos_plugin.sh cosmos-project` if COSMOS is adjacent to adamant_example

cosmos_dir=$1
assembly_yaml='pico_example.assembly.yaml'
cd ../../../../gnd/cosmos
./install_cosmos_plugin.sh ../../src/assembly/pico/$assembly_yaml ../../../$cosmos_dir
cd - >/dev/null

0 comments on commit baca563

Please sign in to comment.