There are two basic steps to get started using local content:

  1. Create a local database (full or partial).

  2. Update your settings.

You can also share local content storage with other users.


Create full database

To create a local copy of the entire database, run this command:

$HOME/ModusToolbox/tools_3.4/lcs-manager-cli/lcs-manager-cli –-add-all 

This creates a copy of the entire database from the remote manifest. It may take a long time depending on how many repos are in the manifest.


Create partial database

To create a local copy of a partial database, specify a particular BSPs using this command:

$HOME/ModusToolbox/tools_3.4/lcs-manager-cli/lcs-manager-cli --add-bsp <BSP Name> 

Where

<BSP Name>

is a valid name of a BSP from the remote manifest. The specified BSP will be added to a file named

watchlist.json

in the

lcs

directory, and the BSP and all dependencies will be downloaded into local content storage.


Note:

In some cases when you use the--add-bspcommand, the tool may not download all the necessary dependencies, resulting in situations where you cannot create the desired application. This can happen if a dependency is referenced by a .mtb file and not in the manifest. To solve this problem, we recommend running lcs-manager-cli with the--add-alloption to download the full database.


Examples of valid BSP names include CYW943907AEVAL1F, TARGET_PMG1-CY7112, and CY8CKIT-062S2-43012. See

GitHub manifest file

for an example of a BSP manifest.


Update settings to use local content

Beginning with the 3.5.0 tools package, there is a ModusToolbox™ Settings tool to configure a wide range of settings for your environment, including LCS settings. You can run the settings tool as a GUI or from the command line. See the Settings tool user guide for more details on specific features.

GUI option

Launch the Settings tool GUI as applicable for your operating system. You can launch it from various tools like Project Creator and Library Manager. Once open, select

Operating Mode > Local Content Mode

to set the LCS mode for all tools.

If your LCS directory is located in a non-default location, use the

Local Content Storage Location

option to specify the location of the

.

modustoolbox/lcs

directory.


Command-line option

Run the Settings tool CLI (mtb-settings-cli) in a terminal (modus-shell on Windows) using the following command:

cd [path to mtb-settings]
./mtb-settings-cli --set operating_mode=local

If your LCS directory is located in a non-default location, also use this command to specify the location of the

.

modustoolbox/lcs

directory:

./mtb-settings-cli --lcs_path="[path to LCS dir]"

Share LCS

As mentioned, local content is stored in your home directory in the

.

modustoolbox/lcs

folder. If you want to share LCS with other users, you can copy it from your computer to a thumb drive or network server.



When other users want to use the local content, they can paste it into the same location on their computer (

[user-home]/

.

modustoolbox/lcs

) and the various ModusToolbox™ tools on the other computer will find it when they switch to use local content.



If another user copies the local storage to an alternate location, they will need to update the settings as described in

Update settings to use local content

section.


Note:

Local content can be shared over a network, but shouldn't be modified while it is shared.