ModusToolbox Project Creator Guide

Overview

The Project Creator tool is used with the ModusToolbox software to create applications based on Board Support Packages (BSPs) and code examples. It is provided as a graphical user interface (GUI) and a command-line interface (CLI) to create applications for use in any software environment you prefer. The GUI provides a simple interface for users who do not want to use the CLI.

Created Application(s)

The Project Creator tool essentially runs a “git clone” command to create one or more applications onto your computer from a remote server. It also runs the “make getlibs” command to import the necessary libraries.

Different types of applications will have different files and directory structures. After creating the application(s), navigate to the specified root directory. Inspect the files and directories located there. Use these files to modify your application(s) as necessary in your preferred environment.

Note

The Project Creator tool generates a log file named project-creator.log in the Application(s) Root Path. This log file captures all commands run by the tool. It will be overwritten if you create a new application in the same path.

Refer to the ModusToolbox User Guide for more details about make commands, BSPs, and the overall structure of ModusToolbox applications.

Library Management Flows

For ModusToolbox 2.2 and later, we implemented a new way of structuring applications, called the MTB flow. Using this flow, applications can share BSPs and libraries. If needed, different applications can use different versions of the same BSP/library. Shared BSPs, libraries, and versions are located in a directory named mtb_shared, which is adjacent to your application directories in the same root path. Refer to the Library Manager User Guide for details.

Looking ahead, most example applications will use the new MTB flow. However, there are still various applications that use the previous flow, now called the LIB flow. These applications generally do not share BSPs and libraries, and these BSPs and libraries are located in an application’s libs subdirectory. ModusToolbox fully supports both flows.

Note When the BTSDK v2.8 is released, it will use the MTB flow.

Launch the Project Creator

You can launch the Project Creator as a stand-alone GUI tool, from the Eclipse IDE for ModusToolbox, and from the command line.

Note

If you prefer to use the Eclipse IDE, you should launch Project Creator tool from the Eclipse IDE included with ModusToolbox instead of as a stand-alone tool or from the command line.

As a Stand-Alone GUI Tool

You can launch the Project Creator as a stand-alone GUI tool. By default, it is installed here:

<install_dir>/ModusToolbox/tools_<version>/project-creator

On Windows, launch the GUI tool from the Start menu. For other operating systems, navigate to the install location and run the project-creator executable.

From Eclipse IDE

The Eclipse IDE included with ModusToolbox provides links and menu items to launch the Project Creator tool and create a project that applies to Eclipse.

For more information, refer to the Eclipse IDE for ModusToolbox Quick Start Guide or User Guide.

As a Command-Line Tool

To run the Project Creator as a stand-alone tool, navigate to the install location and run the project-creator-cli executable. By default, it is installed here:

<install_dir>/ModusToolbox/tools_<version>/project-creator

For more information about command-line options, run the project-creator-cli executable using the -h option. See CLI Description later in this document for an example.

GUI Description

The Project Creator GUI provides a series of pages used to create a project. The GUI executes the CLI options based on your selections.

Choose BSP Page

When you first launch the GUI, it displays the “Choose Board Support Package (BSP)” page that lists the available BSPs.

image2

Import BSP

The “Choose BSP” page provides an Import button image10 to select any custom BSPs you may have created or received from a colleague. You can then create a new application for that custom BSP.

After clicking the Import button, in the Select Folder dialog, select the appropriate custom BSP to use for your new application. Then, the custom BSP will be shown with all the other BSPs.

image3

Note Custom BSPs created using the make bsp command include .mtbx files that provide pre-fetched library information. The Project Creator tool converts .mtbx files into .mtb files that are processed by the make getlibs command to acquire the necessary libraries.

For information about creating custom BSPs, refer to the ModusToolbox User Guide.

Select Application Page

Select a board on the Choose BSP page and click Next > to display the “Select Application” page.

image4

On this page:

  • Specify the Application(s) Root Path, or leave it as the default. All files and folders from the application(s) with a selected check box will be copied to this location in a folder with the Application Name(s).

  • Select one or more check boxes for applications in the list. You can click on the check box or use the right-click context menu. See Select Multiple Applications for more details.

  • Type a New Application Name for the application(s) with a selected check box, or leave the name as the default.

Toolbar Options

The “Select Application” page contains a toolbar with options to assist with the process, including:

image5

  • Search – Shows applications that include the text as entered. See Using Search for more details.

  • Import – Allows you to add other applications to the list. See Import Application.

  • Show/Hide – Toggle to show only the applications with check boxes selected or show all applications. If there is search text, then only applications with check boxes selected and applications with matching search text will be shown instead of all.

  • Select All – Select the check boxes for all applications currently shown in the list.

  • Unselect All – Unselect the check boxes for all applications currently shown in the list.

Select Multiple Applications

The “Select Application” page allows you to select multiple applications, as follows:

  • Click multiple check boxes next to the applications.

  • Click to highlight an application, then press and hold [Ctrl] and click additional applications.

  • Click to highlight an application, then press and hold [Shift] to select a range applications.

When you have multiple applications highlighted, right-click to open the context menu Select Highlighted Applications.

image6

Import Application

The Select Application page also provides an Import button image10 to select other applications you may have created or received from a colleague. After clicking the button, in the Select Folder dialog, select only examples that are supported by the BSP you selected for this application. Then, the example will be shown in the with all the other applications.

image7

Create an Application

Click Create to start the process of creating a ModusToolbox application, and the GUI will display various messages showing the progress.

image8

Note During the project creation process, the tool automatically selects the best pair of BSP and application versions from the manifest file. The selection process has the following preferences:

  • Versions that support the .mtb file flow (see Library Management Flows) are preferred over versions that support the .lib file flow.

  • Latest versions are preferred over release versions.

  • Release versions are preferred over any custom name versions.

Using the command line (see CLI Description), you can manually select which version to use. If the BSP and application flow versions match, then the project-creator tool will create a project. If not, then it will show an error.

The GUI always shows applications that have at least one application version that is supported by at least one BSP version.

When the process competes, the tool will display a message similar to the following:

image9

You can continue creating new projects from the “Select Application” page by selecting a new application and then clicking the Create button again. You can also go back to the “Choose BSP” page to select another BSP and then continue the project creation process as usual.

To close the tool, click the Close button or the X button at the top-right of the GUI.

Note If you launched the Project Creator tool from the Eclipse IDE, the Project Creator tool closes automatically upon completion, and the IDE will import the created application(s).

CLI Description

The CLI allows creating projects from a command-line prompt or from within batch files or shell scripts. The exit code for the CLI is zero if the operation is successful, or non-zero if the operation encounters an error.

Usage project-creator-cli [options]

Options

To see a list of options, run the executable with the -h option.

Example

./project-creator-cli \

—board-id CY8CKIT-062-WIFI-BT \

–app-id BlinkyLED \

—user-app-name MyLED \

–target-dir “C:/cypress_projects”

Version Changes

This section lists and describes the changes for each version of this tool.

Version

Change Descriptions

1.0

New tool.

1.1

Redesigned the GUI to provide a better flow.

Added Settings and Help menus.

Added icon to indicate online/offline status.

Added Import BSP button.

1.2.0

Tool can be launched from Windows Start menu.

Updated versioning to support patch releases.

Updated to select and create multiple applications at one time.

Updated to provide information about new library management flow.