Skip to main content

Getting Started

This section covers the ways to get started using VS Code with ModusToolbox™ software

Create new application

Creating an application includes several steps, as follows:

Step 1: Open Project Creator tool

The ModusToolbox™ Project Creator tool is used to create applications based on code examples and template applications. The tool is provided in GUI form and as a command line interface. For more details, refer to the Project Creator user guide. By default, the tool is installed in the following directory:

[user_home]/ModusToolbox/tools_[version]/project-creator

Open the Project Creator tool as applicable for your operating system. You can launch it from the ModusToolbox™ Dashboard. .

note

The ModusToolbox™ for VS Code extension has an internal process to create an application. Refer to the extension guide.

Step 2: Choose Board Support Package (BSP)

When the Project Creator tool opens, expand one of the BSP categories under Kit Name and select an appropriate kit; see the description for it on the right. For this example, select the KIT-PSC3M5_EVK kit. The following image is an example; the list of boards available in this version will reflect the platforms available for development.

Step 3: Select application

To select an application:

  1. Click Next > to open the Select Application page.

    This page displays example applications, which demonstrate different features available on the selected BSP. In this case, the KIT-PSC3M5_EVK provides the PSOC Control MCU. You can create examples for various peripherals and security.

  2. Click Browse… next to Application(s) Root Path to create or specify a folder where the application will be created.

  3. Pull down the Target IDE menu and select Microsoft Visual Studio Code.

  4. Under the Template Application column, expand Getting Started and select Hello World from the list. This example exercises the PSOC™ Control MCU to blink an LED.

    Note: The actual application names available might vary.

  5. Type a name for your application or leave the default name. Do not use spaces in the application name. Also, do not use common illegal characters, such as:

    * . " ‘ / \ [ ] : ; | = , 

Step 4: Create application

To create the application:

  1. Click Create .

    The tool displays various messages.

    When the process completes, a message states that the application was created.

  2. Click Close to exit the Project Creator tool.

Export existing application

If you have a ModusToolbox™ application that was created for another IDE or the command line, you can export that application to be used in VS Code. Open a terminal window in the application directory and run the command make vscode.

Open workspace in VS Code

In VS Code, select File > Open Workspace from File, navigate to the location of the application that was just created, select the workspace file, and click Open.

../figures/image16.png

Depending on your settings in VS Code, you may see a message about trusting the authors. If so, click Yes, I trust the authors.

../figures/image17.png

VS Code opens with the Hello_World workspace in the EXPLORER view.

../figures/image18.png