Creating a New Project
To create a new project, copy an existing sample act folder with a different name and edit the file names.
MWSDK
directory. However, the folder name must not contain spaces or Japanese characters.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
.
Run build\build-BLUE.cmd
to generate the BIN file (on Windows 10).
On Linux/WSL/macOS, run make TWELITE=BLUE
to verify that the build succeeds.
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 variableMWSDK_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.