/      日本語

Creating a New Project

Creating a new project

To create a new project, copy an existing sample act folder with a different name and edit the file names.

The project file structure is as follows (using PingPong as an example):

Act_samples
  +-PingPong
    +-PingPong.cpp   : Act file
    +-build          : Build folder
    +-.vscode        : VSCode configuration files

Copy this PingPong folder to another location (but the folder name must not contain Japanese characters or spaces).

SomeDir
  +-AlphaBravo
    +-PingPong.cpp -> AlphaBravo.cpp ※ Rename the file
    +-build          : Build folder
    +-.vscode        : VSCode configuration files

The only file that needs editing is the PingPong.cpp file name. Change it to the same name as the folder, AlphaBravo.cpp.

Editing the Build Definition

If you need to add files to the build target, edit build/Makefile. .c and .cpp files directly under the project folder are added automatically, but other files require manual editing.

See the Makefile documentation for editing instructions.

VSCode Configuration

If you use VSCode, edit the definitions under .vscode as needed.

Many samples included in the TWELITE STAGE SDK are set up as follows:

  • The TWELITE STAGE SDK library source code references ${env:MWSDK_TWENET_LIBSRC}/include/** and ${env:MWSDK_TWENET_LIBSRC}/src/**. This environment variable MWSDK_TWENET_LIBSRC is automatically set when opening the project from the TWELITE STAGE app in VSCode.
  • By default, no additional options such as -D are set for the build tasks.