Creating a new project
To create a new project, copy the folder of an already existing sample act with a different name and edit the file name.
The destination folder does not have to be a folder under the MWSDK. However, the folder name must not contain any whitespace characters or Japanese names.
The file structure of the project is as follows (we'll use PingPong
as an example)
Copy this PingPong
folder to another location (but without Japanese characters or spaces in the folder name).
The only thing you need to edit is the file name PingPong.cpp
. Change it to AlphaBravo.cpp
, the same as the folder name.
Run build\build-BLUE.cmd
and if a BIN file is generated, it' is done (Windows 10).
On Linux/macOS, run make TWELITE=BLUE
to see if the build succeeds.
To add files to be built, edit build/Makefile
. The .c
.cpp
files directly under the project will be added automatically, but other files will need to be edited.
See Makefile Description for how to edit the file.。
If you use VSCode, edit the definition under .vscode as necessary.
Most of the examples included in the TWELITE STAGE SDK are as follows
The source code for the TWELITE STAGE SDK library cites ${env:MWSDK_TWENET_LIBSRC}/include/**
${env:MWSDK_TWENET_LIBSRC}/src/**
. This environment variable MWSDK_TWENET_LIBSRC
is automatically set when the project is opened in VSCode from the TWELITE STAGE app.
For the build task, no additional options such as -D
are set by default.