diff --git a/gnd/cosmos/install_cosmos_plugin.sh b/gnd/cosmos/install_cosmos_plugin.sh index 0146258..2988626 100755 --- a/gnd/cosmos/install_cosmos_plugin.sh +++ b/gnd/cosmos/install_cosmos_plugin.sh @@ -27,7 +27,6 @@ cosmos_plugin_dir=`realpath $cosmos_install_dir/openc3-cosmos-${adamant_assembly # Get build directory: adamant_assembly_name_short=(${adamant_assembly_name//_/ }) adamant_example_plugin_dir=`realpath ../../src/assembly/${adamant_assembly_name_short[0]}/build/cosmos/plugin` -adamant_example_template_dir=`realpath ../../src/assembly/${adamant_assembly_name_short[0]}/build/cosmos/template` adamant_protocol_dir=`realpath ../../../adamant/gnd/cosmos` # Copy all protocol files (plugins compile with only needed protocols): cp -a $adamant_protocol_dir/*.rb $cosmos_plugin_dir/targets/${adamant_assembly_name^^}/lib/ @@ -44,9 +43,9 @@ else echo "\"${adamant_assembly_name}_ccsds_cosmos_telemetry.txt\" does not exist, run \"redo cosmos_config\" from the Adamant assembly." exit 1 fi -if [[ -f "$adamant_example_template_dir/${adamant_assembly_name}_ccsds_cosmos_plugin.txt" ]]; then - cp $adamant_example_template_dir/${adamant_assembly_name}_ccsds_cosmos_plugin.txt $cosmos_plugin_dir/plugin.txt +if [[ -f "$adamant_example_plugin_dir/${adamant_assembly_name}_ccsds_cosmos_plugin.txt" ]]; then + cp $adamant_example_plugin_dir/${adamant_assembly_name}_ccsds_cosmos_plugin.txt $cosmos_plugin_dir/plugin.txt else - echo "\"${adamant_assembly_name}_ccsds_cosmos_plugin.txt\" does not exist, run \"redo cosmos_config\" from the Adamant assembly." + echo "\"${adamant_assembly_name}_ccsds_cosmos_plugin.txt\" does not exist, run \"redo cosmos_config\" from the Adamant assembly, review the template plugin file, and copy to the \"build/cosmos/plugin\" directory." exit 1 fi diff --git a/src/assembly/linux/main/README.md b/src/assembly/linux/main/README.md index ad255e6..84b9746 100644 --- a/src/assembly/linux/main/README.md +++ b/src/assembly/linux/main/README.md @@ -88,9 +88,14 @@ $ cd adamant_example/src/assembly/linux/main $ 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. +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, before copying to the plugin directory. By default, this template applies settings specific to this example and should be modified for other configurations. The helper script looks for this file in the plugin directory, so copy it to that location 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/src/assembly/linux +$ cp build/cosmos/template/linux_example_ccsds_cosmos_plugin.txt build/cosmos/plugin +``` + +The helper script, which takes the relative path from the top level of the assembly to the COSMOS install directory as an argument, copies 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/src/assembly/linux/main diff --git a/src/assembly/pico/main/README.md b/src/assembly/pico/main/README.md index e5c8b92..eca755b 100644 --- a/src/assembly/pico/main/README.md +++ b/src/assembly/pico/main/README.md @@ -180,7 +180,7 @@ $ cd adamant_example/src/assembly/pico/main $ redo cosmos_config ``` -This generates the plugin configuration file and its respective command and telemetry configurations in the `adamant_example/src/assembly/pico/build/cosmos/plugin/` directory. The plugin configuration template file is located in the `adamant_example/src/assembly/pico/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 the Linux example using TCP, and should be modified for the serial connection used by the Pico. The Adamant template includes a functional serial configuration in comments. Enable the serial configuration by commenting out the TCP configuration and uncommenting the serial configuration. This should resemble: +This generates the plugin configuration file and its respective command and telemetry configurations in the `adamant_example/src/assembly/pico/build/cosmos/plugin/` directory. The plugin configuration template file is located in the `adamant_example/src/assembly/pico/build/cosmos/template/` directory, and should be reviewed to ensure the interface and required protocols are correct, before copying to the plugin directory. By default, this template applies settings specific to the Linux example using TCP, and should be modified for the serial connection used by the Pico. The Adamant template includes a functional serial configuration in comments. Enable the serial configuration by commenting out the TCP configuration and uncommenting the serial configuration. This should resemble: ``` # COSMOS interface documentation is available at: https://docs.openc3.com/docs/configuration/interfaces @@ -209,7 +209,14 @@ 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 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: +The helper script looks for this file in the plugin directory, so copy it to that location by running: + +``` +$ cd adamant_example/src/assembly/linux +$ cp build/cosmos/template/linux_example_ccsds_cosmos_plugin.txt build/cosmos/plugin +``` + +The helper script, which takes the relative path from the top level of the assembly to the COSMOS install directory as an argument, copies 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/src/assembly/pico/main