6.1. Working with Projects

Important

A working folder must be opened in VS Code first before working with projects. A folder can be opened via menu: File → Open Folder.

Projects are managed from the Projects view in the CCStudio activity bar, which is intended as a replacement for the built-in Explorer tree when working on CCStudio projects.

6.1.1. Importing a Project

Projects can be imported using StartHub or manually.

6.1.1.1. StartHub

StartHub is a wizard-based interface for finding relevant SDK examples quickly and importing them into your development environment. It is recommended for importing/creating new projects. It can be opened using the Open StartHub option described in the vsc-getting-started section:

_images/ccsvsc_project-management-starthub.png

Use the Device and Board filter field to search and select the device or TI LaunchPad Kit that you are using.

If you have a valid TI kit (such as a LaunchPad Development Kit) connected to your computer, Resource Explorer may be able to autodetect it. If autodetect is successful, you can select the USE MY BOARD option to specify your kit.

Once a board or device has been selected, either select BROWSE EXAMPLES to browse complete SDK examples for the target or CREATE NEW PROJECT to browse just the empty-based SDK template examples. Below is an list of available SDK examples for the selected target:

_images/ccsvsc_project-management-starthub-import_01.png

When an example is selected, a side panel will open where you can browse the README and view the associated SOURCE CODE. To import the example, select the IMPORT button to open the import wizard.

_images/ccsvsc_project-management-starthub-import_02.png

Follow the steps in the import wizard to complete the project import.

6.1.1.2. Manual Import

Projects can also be imported manually, for example from an existing local SDK install:

  1. Open the Projects view.

  2. Click Import Project in the Get Started view, or run CCStudio Project: Import Project from the Command Palette.

  3. Select the folder that contains the example project(s), typically inside your installed SDK.

  4. Choose one or more projects to import.

  5. If you have several folders open, choose where to import the projects.

_images/ccsvsc_project-management-import.png

Once a project has been imported to the workspace, it will appear in the Projects view (see below).

6.1.2. Projects View

The Projects view is a dedicated CCStudio Projects panel listing your projects and their contents, intended as a replacement for the built-in Explorer tree when working on CCStudio projects. Import projects, then build, clean, re-build, and debug them from the Projects view.

_images/ccsvsc_project-management-projects-view.png

The Projects view has a top level toolbar:

  • Import Project: Same functionality as described above.

  • Open CLI Terminal: Open the Terminal view for Project CLI execution. See Project Command Line Interface for the available commands.

  • Refresh Project Tree: Refresh the project tree below.

  • Collapse All: Collapse all expanded nodes below.

Select a project or build configuration in the view, then use the inline Build and Debug icons, or right-click for more options:

  • New File: Create a new, empty file in the selected folder.

  • New Folder: Create a new, empty folder in the selected folder.

  • Build: Compile the project.

  • Clean: Remove build output.

  • Re-build: Clean, then build.

  • Debug: Builds the project (incremental) and starts a debug session. See the vsc-debug chapter for more information.

  • Set as Active Build Configuration: Choose which configuration to build and debug.

  • Switch to Unmanaged/Managed Mode: Toggles whether the project's CMake fragment files are maintained automatically by CCStudio (Managed) or manually by the user (Unmanaged). See Project Files and Build System Overview for more information.

  • Copy Path: Copy the selected item's absolute file system path to the clipboard.

  • Rename: Rename the selected file or folder.

  • Delete: Delete the selected file or folder.

The context menu for individual files in the project has the following options:

  • Open to the Side: Open the file in a new editor group beside the currently active editor.

  • Reveal in File Explorer: Open the system file manager (Windows Explorer, Finder, etc.) to the file's location.

  • Cut: Mark the file to be moved the next time you paste.

  • Copy: Mark the file to be duplicated the next time you paste.

  • Copy Path: Copy the file's absolute file system path to the clipboard.

  • Copy Relative Path: Copy the file's path relative to the workspace folder to the clipboard.

  • Rename: Rename the file.

  • Delete: Delete the file.

6.1.3. Build Output

Before a build, all open files are automatically saved by default. Build output is sent to the output panel with syntax highlighting to make build and error output easier to read:

_images/ccsvsc_project-management-build-output.png