This is the multi-page printable view of this section. Click here to print...

Return to the regular view of this page

As of 2025-07-24

Installation Method

How to install the TWELITE STAGE SDK

Depending on the operating environment, various settings may be required for this application to function properly. If any issues arise, please refer to this document to prepare your environment.

Installation Procedure for TWELITE STAGE SDK

① Obtain the Archive

Download the TWELITE STAGE SDK for each platform (Windows / macOS / Linux) from Download.

② Extract the Archive

Extract the downloaded Zip archive.

③ Check the Files

Check the extracted folder.

The extracted folder {MWSTAGE Installation} contains the following:

  • TWELITE STAGE APP
    • For Windows: TWELITE_Stage.exe (standard version), TWELITE_Stage_VSCode.exe (VSCode compatible version)
    • For macOS: TWELITE_Stage.command (standard version), TWELITE_Stage_VSCode.command (VSCode compatible version)
    • For Linux: TWELITE_Stage.run (standard version), TWELITE_Stage_VSCode.run (VSCode compatible version)
  • TWELITE_STAGE - related files of TWELITE STAGE APP
  • MWSDK - libraries, source code, etc.
  • Tools - toolchains for building
  • BIN - .BIN files for TWELITE referenced by the [Select from BIN] menu of TWELITE STAGE APP
  • log - storage location for logs and database files of TWELITE STAGE APP
  • flask_wsns_db - simple server using Python, Flask, and sqlite3

For details, see “Folder Structure”.

1 - Folder Structure

About the folder structure of TWELITE STAGE APP

TWELITE STAGE APP operates as the frontend application of TWELITE STAGE SDK.

Here, we explain its folder structure.

MWSTAGE/            : TWELITE STAGE SDK installation
  TWELITE_Stage.??? : Executable (Windows .exe, macOS .command, Linux .run)
  TWELITE_Stage.sav : Configuration file
  TWELITE_Stage.ini : Other settings
  TWELITE_Stage/    : Related files of TWELITE STAGE APP

  MWSDK/            : MWSDK libraries etc.
  BIN/              : Storage destination when [Select BIN file] is used
  log/              : Log and database storage destination

  Tools/            : A set of tools including gcc compiler

  flask_wsns_db/    : Simple server using Python, Flask, sqlite3

MWSDK folder

MWSDK/
  Act_samples/        : Sample code using mwx library
  Wks_TweApps/        : Source code of TWELITE APPS
  Act_extras/         : More specialized samples using mwx library, and those referencing other libraries
  TWENET/             : TWENET library (mwx library etc.)
  ChipLib/            : Semiconductor library
  MkFiles/            : Core processing part of Makefile
  docs/               : Library manuals etc.
  LICENSE             : License description of MWSDK
  000manifest         : Version information of MWSDK
  ReleaseNotes.md     : Update history (top page)
  ReleaseNotes_en.md  : Update history (English)
  ReleaseNotes_jp.md  : Update history (Japanese)

The MWSDK folder contains libraries for building TWELITE software, samples, and source code of TWELITE APPS.

TWELITE_Stage.sav

Stores the configuration information of TWELITE STAGE APP.

The file name is the TWELITE STAGE APP executable name + .sav.

TWELITE_Stage.ini

Details of .ini file are here.

  • MWSDK= Edit this when you want to specify a different folder instead of the MWSDK/ folder. This is useful when mixing multiple library versions. In the above example, the MWSDK2020_10 folder is used.
  • LANG= Specify LANG=en to set the display language of TWELITE STAGE APP to English.

Running TWELITE STAGE APP with different settings

Copy TWELITE_Stage.exe (for Windows) with a different file name. For example, if changed to TWS1.exe, it refers to configuration files named TRS1.sav and TRS1.ini.

BIN folder

When selecting the [Select from BIN] menu in TWELITE STAGE APP, firmware files (.BIN) in this folder are used.

log folder

When running the serial port logging function in TWELITE STAGE APP, log files are stored in this folder.

This folder is also the storage destination for database files when using the graph function and for outputting csv files.

Tools folder

Contains cross-compiler toolchains such as gcc, g++.

Platform-specific utilities are also stored in this folder. For details, see Tools/readme.txt.

flask_wsns_db folder

Python sample script to access the database created by the sensor graph viewer of TWELITE STAGE APP. This sample allows viewing tables and graphs in a web browser.

For details, see flask_wsns_db/README.html.

Build project folder

Folder search order

TWELITE STAGE APP searches build project folders (Act_samples etc.) in the following order:

  1. The folder where TWELITE STAGE APP was started
  2. The folder where the TWELITE STAGE APP executable is located
  3. {MWSDK folder}/..
  4. {MWSDK folder}

Wks_Acts

If you create a Wks_Acts folder, this folder is referenced from the [act Build & Rewrite] menu instead of the Act_samples folder.

2 - Platform-specific Notes

Platform-specific notes for installation

This document describes notes to consider when installing the TWELITE STAGE APP on each platform.

2.1 - Notes When Installing on Windows

Notes when installing the TWELITE STAGE APP on Windows
Windows

Environment

The development and operation have been confirmed in the following environment.

  • Windows 10 Version 1903
  • Visual Studio 2019 (32bit build)

Handling of Serial Ports

MONOSTICK and TWELITE R series are equipped with FTDI’s USB serial conversion ICs (FT230/FT232 series). To use these, device driver installation may be required.

If the PC does not recognize MONOSTICK or TWELITE R, please install the D2XX driver from https://www.ftdichip.com.

Additional Installation of Visual C++ Runtime Library

In some cases, the Visual C++ redistributable code (runtime library) of Visual Studio 2019 is required.

If an error occurs when starting the application and it does not launch, run TWELITE_Stage¥INSTALL¥VC_redist.x86.exe distributed in this package, or obtain it from Microsoft’s website. Note that the redistributable binary is 32bit.

2.2 - Notes When Installing on macOS

Notes when installing the TWELITE STAGE APP on macOS
macOS

Environment

The development and operation have been confirmed in the following environments.

  • macOS 10.14 (Mojave, Intel)
  • macOS 12 (Monterey, Apple Silicon)

Installing Rosetta 2

Rosetta 2 is required for building applications for the BLUE / RED series.


/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Dependent Software and Warning Dialogs

If the following issues occur, permission to execute or installation is required for the operation of TWELITE_Stage.command.

  • Although the toolchain is code-signed, if the code signature is not properly verified, you may be prompted to allow execution individually for each executable in the build toolchain (such as ba-elf-gcc).
  • The downloaded archive is not signed. At runtime, security warnings may appear indicating that the application was downloaded from the Internet.
  • You may be asked to allow execution from the path where TWELITE_Stage.command is installed.
  • A dialog for installing the make utility may appear during build execution.

Additional Installation of make Utility

In some cases, you may need to install the make utility.

If an error occurs when running make from the command line (zsh), install the Command Line Tools.


xcode-select --install

Once the installation is complete, enter make and check for the following output message.


make
make: *** No targets specified and no makefile found.  Stop.

Handling Serial Ports

MONOSTICK and TWELITE R series are equipped with USB serial converter ICs (FT230/FT232 series) from FTDI (https://www.ftdichip.com). To use these, device driver installation may be required.

If the serial port does not appear even after launching TWELITE_Stage.command, please unload (disable) the FTDI driver.

You can download D2xxHelper from https://www.ftdichip.com/Drivers/D2XX.htm. The same is also included in the TWELITE_Stage/INSTALL folder of the TWELITE STAGE SDK.

Reference: Manual Unloading of FTDI Device Driver

To unload FTDI-related drivers, execute the following command.


sudo kextunload -b com.apple.driver.AppleUSBFTDI

2.3 - Notes When Installing on Linux

Notes when installing the TWELITE STAGE APP on Linux
Linux

Environment

Development and operation have been confirmed on the following environments.

  • Ubuntu 16.04, 18.04, 20.04
  • NNLinux Beta8 64bit
  • CentOS 7

Handling Serial Ports

To recognize MONOSTICK or TWELITE-R from TWELITE STAGE, you need to unload the ftdi_sio module and grant read/write permissions to the USB device.

We provide udev setting scripts (for Ubuntu, CentOS) to automate this configuration.

Copy the definitions to /etc/udev/rules.d and reload the settings. After setting, unplug and replug the USB device, then run TWELITE_Stage.run. If the USB device appears on the initial screen, the settings have been applied.

Ubuntu 16.04, 18.04, 20.04


cd ./MWSTAGE/TWELITE_Stage/INSTALL/ubuntu/
sudo ./set_udev_sudo.sh

Definition file (line breaks added for readability)

ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"
ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"

CentOS 7


cd ./MWSTAGE/TWELITE_Stage/INSTALL/centos/
sudo ./set_udev_sudo.sh

Definition file (line breaks added for readability)

ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
   MODE="0666",
   RUN+="/bin/sh -c '/usr/sbin/rmmod ftdi_sio'"
ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015",
   MODE="0666",
   RUN+="/bin/sh -c '/usr/sbin/rmmod ftdi_sio'"

Registering the Application

Register the application according to your desktop environment as needed.

Ubuntu 16.04, 18.04, 20.04

We provide a script to generate definition files for Ubuntu.


cd ./MWSTAGE/TWELITE_Stage/INSTALL/ubuntu/
./make_launch_icon.sh

This script creates a .desktop file (application definition) in $HOME/.local/share/applications.

After running the script, the TWELITE STAGE icon will be added to the application list.

2.4 - Notes When Installing on Raspberry Pi

Notes for installing the TWELITE STAGE APP on Raspberry Pi
RasPi

TWELITE STAGE APP runs on Raspberry Pi except for some models.

  • Supports mouse and touch screen.
  • Comes with a build toolchain, allowing compilation.
  • In addition to the X11 version executable, there is a framebuffer version (nox), as well as a lightweight version that omits translucent effects and others.

Environment

The development and operation have been confirmed in the following environment.

Hardware

  • Raspberry Pi 3 Model B
  • LCD Screen: Raspberry Pi Touch Display (7")

Software

  • Raspberry PI OS (32bit) Lite (Version: August 2020)

Known Issues and Limitations

  • On the first startup, /dev/serial0 may fail to operate.
  • Operation of /dev/serial0 on Raspberry Pi 4B has not been verified.
  • Operation of the touchscreen on Raspberry Pi 4B has not been verified.
  • Input strings to TWELITE STAGE are also passed as-is to shells or getty running on /dev/tty1. It is recommended to start from /dev/tty1.
  • It may be affected by other installed or running programs (such as X11).

Extracting the Archive

Extract the downloaded archive file into a folder whose path does not contain spaces or Japanese characters.

Below, it is extracted into the Raspberry Pi home folder.


cd /home/pi
unzip MWSTAGE2020_XX_YYYY.zip

Folder Structure

../MWSTAGE
     TWELITE_Stage.run    TWELITE_Stage app
     BIN/                 Firmware BIN files
     MWSDK/               MWSDK libraries, etc.
     TWELITE_Stage/       TWELITE_Stage app related files

Device Drivers

To recognize MONOSTICK or TWELITE R from TWELITE STAGE, it is necessary to unload the ftdi_sio module and grant read/write permissions to the USB device.

A udev configuration script is provided to automate this setting. Copy the definition to /etc/udev/rules.d and reload the settings. After setting, unplug and plug the USB device before running TWELITE_Stage.run. If the USB device is displayed on the screen immediately after startup, the setting has been applied.


cd ./MWSTAGE/TWELITE_Stage/INSTALL/ubuntu/
sudo ./set_udev_sudo.sh

Definition file (formatted with line breaks for readability)

ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"
ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"

Handling Serial Ports

In the above environment, /dev/serial0 can be used by configuring the serial port via raspi-config.


sudo raspi-config

From the menu

  "3 Interface Options    Configure connections to peripherals"
  →"P6 Serial Port Enable/disable shell messages on the serial connection"

Select as follows to disable login shell usage and enable hardware.

  "Would you like a login shell to be accessible over serial?" -> 
  "Would you like the serial port hardware to be enabled?" → 

Wiring Example

 [TWELITE]               [Raspberry Pi]
  GND  ------------------ Ground (#6,#9,#14,#20,#25,#30,#34,#39 one of these)
  TXD(DIO6,DIP#10) ------ GPIO15/UART0 RXD (#10)
  PRG(SPIMISO,DIP#7) ---- GPIO23 (#16)
  RXD(DIO7,DIP#3) ------- GPIO14/UART0 TXD (#8)
  RST(RESETN,DIP#21) ---- GPIO22 (#15)
  VCC  ------------------ 3V3 (#1,#17 one of these)
  SET(DIO12,DIP#15) ----- GPIO12 (#32)
  • Please refer to the manuals of both TWELITE and Raspberry Pi.
  • DIP# refers to the pin number of the TWELITE DIP.
  • The above wiring does not guarantee stable operation of TWELITE.

Starting TWELITE STAGE APP

  • The framebuffer version (nox) does not work on the X11 desktop. Please exit X11.
  • Run TWELITE_Stage.run. The TWELITE STAGE APP will be displayed on the screen.

Notes

  • Supports mouse and touch panel.
  • Input characters in the TWELITE STAGE APP may also be displayed on the console screen.

Others

/dev/dri Error

If the following error appears when starting TWELITE_Stage.run, you can ignore it.

  "The path /dev/dri/ cannot be opened or is not available"

Insufficient Memory

If the number of CPUs is 4 or more, parallel compilation will be executed with one less than the number of CPUs during build (3 parallel for 4 cores). Insufficient memory may occur in some cases. In that case, please change the number of parallel jobs.

Raspberry Pi 4

Raspberry Pi OS (bookworm)