TWELITE STAGE APP is an application used for building and rewriting firmware, configuring TWELITE APPS, and displaying data. It is used in the TWELITE STAGE evaluation and development environment.
If you notice any issues, we would appreciate it if you could contact our support desk.
The display examples in this document (button names and screen captures) correspond to the version at the time of document creation. There may be some differences from the version you have obtained.
The Mono Wireless official repository distributes the standalone binary of the TWELITE STAGE app. Please use this if you want to update only the TWELITE STAGE app or obtain the M5Stack version. The version of each binary can be identified from the tags on GitHub.
The TWELITE STAGE app is intended to operate with the latest stable TWELITE STAGE SDK distributed as a stable version. Therefore, the new TWELITE STAGE app may not work correctly with older SDKs.
The source code of the TWELITE STAGE app is placed in examples/TWELITE_Stage.
2 - How to Use
How to use TWELITE STAGE APP
This section explains the screens and operation methods of the TWELITE STAGE APP.
How to Launch the App
To launch the TWELITE STAGE app, execute the executable file located in {MWSTAGE Installation}.
When replacing the executable file of the TWELITE STAGE app due to updates, be sure to copy it to the specified folder {MWSTAGE Installation}. Behavior is undefined if the executable is placed in any other path.
The method of execution varies depending on the platform (Windows, macOS, Linux).
System
Extension
Notes
Windows
.exe
Double-click the executable file in Explorer
macOS
.command
Double-click the executable file in Finder
Linux
RasPi
.run
Depends on the distribution and installation environment.Execute as a command from a terminal window (such as xterm) on the X Window System
Executable Types of the App
The TWELITE STAGE APP has two types of executables.
TWELITE_Stage.{extension} - Launches with standard settings.
TWELITE_Stage_VSCode.{extension} - Configured to “Use VSCode” (settings saved in TWELITE_Stage_VSCode.ini). When the VSCode usage setting is enabled, the app operates in a way suitable for development work using VSCode.
The TWELITE STAGE APP does not produce errors when multiple instances are launched, but some features (such as the sensor graph function) may malfunction if multiple instances are running simultaneously.
Therefore, when running multiple apps at the same time, you need to duplicate the executable and launch separate files. This separates various configuration and input/output files, avoiding mutual interference.
App Interface
When you launch the app, two types of windows are displayed:
Main Window
Displays the user interface of the TWELITE STAGE APP.
The serial port under connection (e.g. TWELITE-R or TWELITE STICK) is displayed in the title bar.
All operations of the TWELITE STAGE APP are performed within this window.
Press the ALT (Cmd) key to display the operating aid screen.
The [ A ][ B ][ C ] buttons appear at the bottom of the screen and are used for operation. These buttons can be pressed and held down to call up sub-functions.
Command Window
Usually not used, but displays auxiliary information.
Shows serial communication content, making it ideal for checking logs.
When launched from the command line, the originating terminal acts as the command window.
Example Screen of TWELITE STAGE APP
Exiting the App
Exit the app by any of the following methods:
Move the mouse pointer to the upper right of the execution screen and press the exit button displayed within the screen.
Close the app window (on macOS, ⌘Q can also be used).
On rare occasions, the execution screen may remain after the exit operation. In such cases, please try the following:
Close the TWELITE STAGE APP command line window.
Force quit the app (refer to your system’s documentation for how to force quit).
2.1 - Key and Mouse Operations
Key and mouse operations for TWELITE STAGE APP
Windows
macOS
Linux
RasPi
This section explains the key and mouse operations used in TWELITE STAGE APP.
Key Operations
Windows
macOS
Linux
RasPi
Key inputs performed while holding down Alt (Cmd) are assigned to operations such as changing the settings of TWELITE STAGE APP. Other key operations generally function as normal text input.
Common Keys
Windows
macOS
Linux
RasPi
Key
Meaning
ESCESC
Quickly press ESC twice. Cancel or return to the previous screen.On some screens, pressing once returns to the previous screen.
ENTER
Enter, Select
BS
Delete one character
Cursor Keys↑↓
Select item
Help Screen
Windows
macOS
Linux
RasPi
Hold down Alt (Cmd) to display the help screen. The help screen shows explanations of keys that can be used together with Alt (Cmd) and some operational status.
The help screen can also be displayed by moving the mouse pointer to the top-left corner of the screen.
Help Screen
Alt (Cmd) + Operations
Windows
macOS
Linux
RasPi
This section explains operations performed while holding down Alt (Cmd).
In the table below, the Alt (Cmd)+ prefix is omitted. You can check the available keys from the help screen above, but supplementary explanations are provided in the table below.
Alt (Cmd)+ Key
Meaning
I
Inputs + + +. This is the key sequence to enter interactive mode.※ Apps that perform intermittent operation due to sleep are not supported.
R
Resets the module. Controls the reset pin using the functions of TWELITE R or MONOSTICK.
A, S, D
Press buttons A, B, C.
Shift+A, S, D
Long press buttons A, B, C.
C
Copies the text displayed on the screen to the clipboard. (The range varies depending on the screen)
V
Pastes from the clipboard as keyboard input.
F
Switches to full-screen display. If Shift+F is pressed, it enlarges further if possible.
G
Changes the screen rendering method. It emulates a 640x480 LCD screen, but for enlargement, four rendering styles can be selected: (1. LCD monitor style / 2. CRT style / 3. Enlarged with dots emphasized / 4. Enlarged with dots blurred).※ You can change the startup setting in the settings menu.
J
Selects the screen size. Available sizes are {640,480}, {1280,720}, {1280,960}, {1920,1440}, {2560,1440}, {320,240}.※ Can be set as startup setting in the settings menu.
Q
Quits TWELITE STAGE APP.
0
Disconnects the serial port and shows the list of serial ports again.
1, 2, …
Selects the serial port.
B
Change baud rate if serial port is open (9600, 19200, 38400, 57600, 115200, 234000).
L, Shift+L
Starts logging serial port input/output. When finished, the log file opens with Notepad on Windows or Log Viewer on macOS. Shift+L opens the log storage folder.
Other Operations
Key
Meaning
Alt (Cmd)+Shift+Ctrl+m
Opens the MWX library code folder.
Alt (Cmd)+Shift+l
Opens the log folder.
Mouse Operations
Windows
macOS
Linux
RasPi
Mouse operations mainly involve left-clicking, but right-click, right double-click, and the scroll wheel may be used.
Mouse Operation
Meaning
Left click
Select
Left click and drag
Used on some screens (e.g., dragging on graph screens)
Left double-click
Not used
Right click
Used on some screens
Right double-click
Exit the screen (same as ESCESC)
Scroll wheel
Used on some screens (e.g., zoom in/out on graph screens)
Mouse Control of A, B, C Buttons
Windows
macOS
Linux
RasPi
When you move the mouse pointer to the menu display at the bottom of the screen, buttons labeled [ A ], [ B ], and [ C ] appear. TWELITE STAGE APP assigns functions of the hardware buttons arranged in this way to each screen. You can call the functions by left-clicking or long-pressing these buttons. (They can also be selected with Alt (Cmd)+a,s,d or Alt (Cmd)+Shift+a,s,d)
Example of virtual [ B ] button displayed at the bottom of the screen
Mouse Control of Screen Operations
Windows
macOS
Linux
RasPi
On Windows/macOS/Linux, TWELITE STAGE APP screens are basically composed of text only, but menus, buttons, and tabs can be operated with the mouse.
Example of Commander Screen
The screen consists of text only, but the tabs at the top of the screen and inverted text can be selected by left-clicking with the mouse.
2.2 - Screen Operations
Operation instructions for each screen of TWELITE STAGE APP
Windows
macOS
Linux
RasPi
Example of the menu screen
Windows / macOS / Linux / Raspberry Pi
TWELITE STAGE APP is an application launched from the console screen (command line). It outputs information to both the console screen and window screen.
The console screen displays UART output similar to a terminal.
In some environments, the console screen may accept input, but this is not considered an officially confirmed feature.
Raspberry Pi (nox)
Displays on the framebuffer without using X11.
Normally (when started from a shell screen on the framebuffer), the console screen is not displayed.
2.2.1 - Serial Port Selection
Operation instructions for the serial port selection screen
Windows
macOS
Linux
RasPi
Overview
On Windows / macOS / Linux, a screen to select the serial port connected to TWELITE is displayed at startup. However, the serial port can also be connected later.
Example of the serial port selection screen
In the TWELITE STAGE app, the serial port selection and the processing of each screen are not linked. For example, if you start the viewer without selecting a serial port, the display will not update. When you select a serial port in this state, the viewer display will be updated.
Also, the serial port can be switched at any time using the shortcut keys Alt(Cmd) + 0, 1, 2, …
Windows
Press the c key to display the COM port name of the serial port currently highlighted in the list.
Raspberry Pi
On Raspberry Pi, in addition to USB devices, if /dev/serial0 and /dev/serial1 exist, serial0 and serial1 will be displayed. Normally, serial0 is used.
2.2.2 - Main Menu
Operation instructions for the main menu screen
Windows
macOS
Linux
RasPi
This is the top level of the hierarchical menu.
Example of the main menu screen
On this screen, you select a menu. When a menu is highlighted, a brief explanation is displayed in green text at the bottom.
Viewer: A viewer that interprets and displays packets received from TWELITE. In many cases, the receiving TWELITE is programmed with App_Wings.
Write Firmware: Build the firmware and write it to the connected TWELITE.
Interactive settigns mode: Configure the connected TWELITE settings via interactive mode.
Settings of TWELITE STAGE: Configure various settings of the TWELITE STAGE app.
Select SERIAL port: Select the serial port.
Open MANUAL: Menu to display manuals. Opens the following manuals in a browser:
TWELITE STAGE App (this document)
MWX Library
TWENET_C Library
2.2.2.1 - Viewer
About the viewer
Windows
macOS
Linux
RasPi
The viewer is a feature for displaying information received from a connected TWELITE and sending commands.
Each viewer is a relatively small program that also serves as a sample for how to use the mwm5 library.
2.2.2.1.1 - Terminal
Operation instructions for the Terminal screen
Windows
macOS
Linux
RasPi
Example of the Terminal screen
Overview
A general VT100-compatible serial terminal.
Supports TWELITE interactive mode and reset control.
Operations
Operation
Description
[ A ]
Input the + + + sequence (interactive mode)
[ A ]Long press
Exit this screen and return to the previous menu.
[ B ]
Display a partial area of the first screen with a larger font.The area is selected so that the cursor is visible on the screen, but depending on the screen output, the desired part may not be visible.
[ B ]Long press
Toggle word wrap ON/OFF.By default, word wrap is enabled, but you can also display without wrapping. Characters beyond the right edge of the screen will not be displayed.
[ C ]
Move to the firmware update screen.During firmware development, source code modification, operation check, build & write are frequently performed, so a shortcut is provided.
[ C ]Long press
Control and reset the TWELITE reset pin.
ESCESC
Press the ESC key twice quickly to exit this screen.※ In most screens, pressing the ESC key once exits the screen, but in the terminal, a single ESC key input is used for other purposes, so double input is assigned.
2.2.2.1.2 - Standard App Viewer
Operation instructions for the Standard App Viewer screen
Windows
macOS
Linux
RasPi
Example of the Standard App Viewer screen
Overview
The TWELITE communicating partner should have App_Twelite (Standard App) programmed. When a message indicating the status of buttons or analog inputs of the Standard App (0x81 message) is received, its contents are interpreted and displayed using the mwm5 parser library.
Please program the TWELITE connected to the PC with either App_Twelite (Standard App) or App_Wings (Parent/Relay App), and confirm that the data received from the communicating TWELITE is displayed in the terminal before use.
Operations
Operation
Description
[ A ]
No assignment
[ A ]Long press
Exit this screen and return to the previous menu.
[ B ]
Change the font.
[ B ]Long press
Display the screen with test dummy data.
[ C ]
No assignment
[ C ]Long press
Control the reset pin of the TWELITE to reset it.
ESCESC
Press the ESC key twice to exit this screen.
2.2.2.1.3 - Graph
List of graph screens
Accelerometer Real-Time Graph: Displays accelerometer sensor packets in real time. Frequency domain display and CSV file saving are available.
Sensor Graph: Saves data from various TWELITE sensors into an sqlite3 database and displays graphs.
2.2.2.1.3.1 - Accelerometer Real-Time Graph
Operation instructions for the Accelerometer Real-Time Graph screen
Windows
macOS
Linux
RasPi
Example Display of Demo Data
Overview
This refers to packets received from TWELITE CUE and TWELITE Motion Sensor PAL. It can display accelerometer data in real-time, and includes features for frequency analysis and CSV export.
In the Accelerometer Real-Time Graph, each sample data is processed separately.
On the other hand, the Sensor Graph records one packet as one sample, even when continuous measurement with multiple samples per packet is performed.
It supports three modes: CUE mode, MOT mode, and 2525 FIFO mode.
When a continuous series of samples reaches a certain number (analysis window), frequency analysis of the XYZ axes is displayed. However, in 2525 FIFO mode, it is assumed to be always continuous.
When packet boundaries are explicit (e.g., when more than 3 seconds have elapsed since the previous packet, in CUE mode for each packet, or in MOT mode when the packet sequence number is discontinuous), four dummy samples are inserted and a pink background is shown.
Data from up to four nodes are stored on a first-come, first-served basis.
When operating multiple nodes, packet collisions cause many communication failures. Especially in FIFO mode, transmission intervals are almost fixed, and nodes try to transmit packets nearly simultaneously, which may cause prolonged transmission failures due to interference. As a rule, operate one node per wireless channel.
Typical settings for Motion Sensor PAL mode when using the Accelerometer Real-Time Graph are as follows:
To measure continuously at about 25Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000000)
To measure continuously at about 50Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000100)
To measure continuously at about 100Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000200)
To measure 128 samples at about 100Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000208)
To measure 256 samples at about 100Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000210)
To measure 64 samples at about 50Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000104)
To measure 128 samples at about 200Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000308)
Operation
Operation
Description
Top right(i)ID# button
Click to switch the ID.(Note: Continuous sample data in FIFO mode is not suitable for multi-ID operation)
Top right(f)SMP# button
Click to change the analysis window size among 64, 128, and 256.
Bottom right(c)Save Display Data button
Exports data in CSV format to the log folder.Outputs from the oldest sample in the buffer to the latest sample at the right edge of the screen.(Note: The output is always 5120 samples, with the latest data at the end)
Bottom rightPAUSE( ) button
Pauses display updates.(Note: Samples are still collected until the internal temporary sample buffer is full)
Mouse drag(Graph area)
Moves the position of displayed samples.
Mouse drag(Bottom scrollbar)
Moves the displayed sample position in larger steps.
Arrow keys→←
Moves the sample display area.
Arrow keys↑↓
Zooms in/out on the horizontal axis of samples (1x / 2x / 3x / 4x).(Note: Up to 2x when the analysis sample count is 256)
Sample Rate Estimation
The sampling rate is calculated from the packet reception times. It averages the reception times of multiple past samples to estimate one sample interval, so packet drops may cause significant errors.
Also, the related log timestamp (T_SMPL) is an estimated value and is delayed compared to the packet acquisition time.
Once sample rate estimation completes, graph scrolling becomes smooth.
Opening the CUE Graph Mode on Startup
Specify 31 in [STAGE Common Settings → Startup App Selection].
Log Output (Save Display Data)
Pressing the (c) Save Display Data button outputs up to 512 samples starting from the current display position (rightmost sample).
Note that the latest samples are recorded at the end, so there may be no data at the beginning.
Log file name is {log folder}/acc_snap_{timestamp}.csv.
Data has the newest sample at the right edge as sample number 512 (file end).
When frequency analysis is performed, the last samples used for frequency analysis are included.
Frequency analysis results are added to rows containing frequency analysis target samples (for 64 samples, results appear from sample 449 for 32 rows, showing from DC to high frequency components).
Label
Item Name
Description
#
SampleNumber
T_PKT[ms]
PacketReception Time
Multiple samples may be included in one packet, so samples with the same timestamp are listed.
SEQ
PacketSequence Number
Assigned to each packet; continuity indicates no packet loss.
T_SMPL[ms]
SampleTime (Virtual/Estimated)
Timestamp generated for each sample from packet reception time.Does not match the actual sampling time.(Note: Sample rate is estimated from packet reception intervals, and sample times are cumulatively added, so timestamps are delayed by one packet interval compared to actual sample time)
X[G]
X-axis Sample Value
Unit is G. Based on sensor values.
Y[G]
Y-axis Sample Value
Unit is G. Based on sensor values.
Z[G]
Z-axis Sample Value
Unit is G. Based on sensor values.
FD#
Frequency Analysis Calculation Index
For 64 samples, ordered as DC,1,2,...,31.
Hz
Frequency Analysis Frequency Axis Value
Estimated frequency, calculated as (FD# / FD_Len) * FD_Freq.
System time when the log file was opened(Note: TWELITE STAGE app side)
Date
Date when the log file was opened
Time
Time when the log file was opened
Time_Msec_part
Sub-second part of time when the log file was opened [ms]
Samples
Valid sample data
FD_Len
Frequency analysis sample count
FD_Start#
Frequency analysis start sample number
FD_Freq
Estimated frequency range for frequency analysis [Hz](Note: estimated from sample reception interval)
Log Output (Auto Save)
When the Accelerometer Real-Time Graph screen is opened and data is input, log files are automatically saved.
Log file name is log folder/accel_{serial number}_{timestamp}.csv.
While the screen is open, files are being written, so they may not be available for reading or may be incomplete.
Label
Item Name
Description
#
SampleNumber
T_PKT[ms]
PacketReception Time
Multiple samples may be included in one packet, so samples with the same timestamp are listed.
SEQ
PacketSequence Number
Assigned to each packet; continuity indicates no packet loss.
T_SMPL[ms]
SampleTime (Virtual/Estimated)
Timestamp generated for each sample from packet reception time.Does not match the actual sampling time.(Note: Sample rate is estimated from packet reception intervals, and sample times are cumulatively added, so timestamps are delayed by one packet interval compared to actual sample time)
System time when the log file was opened(Note: TWELITE STAGE app side)
Date
Date when the log file was opened
Time
Time when the log file was opened
Time_Msec_part
Sub-second part of time when the log file was opened [ms]
2.2.2.1.3.2 - Sensor Graph
Operation instructions for the Sensor Graph screen
Windows
macOS
Linux
RasPi
Example of data display
Overview
Various sensor data are recorded in an SQLite database and displayed on the screen in graph format. The database file can also be accessed by external applications.
You cannot run multiple instances of TWELITE STAGE APP with the same executable name to use the Sensor Graph simultaneously.
The database file is stored in the {MWSTAGE Installation}/log folder, and the filename is determined based on the executable name of TWELITE STAGE APP. If the executable names are the same, they will refer to the same database file. The TWELITE STAGE APP implementation does not assume multiple apps add data to the same database simultaneously. In some cases, this may cause database file access errors and cause TWELITE STAGE APP to crash.
For example, if you want to connect two MONOSTICK devices to a PC and run multiple “Sensor Graph” instances simultaneously, run multiple TWELITE STAGE apps with different executable names (e.g., TWELITE_Stage_a.exe, TWELITE_Stage_b.exe). The database filenames will be log/TWELITE_Stage_a_WSns.sqlite and log/TWELITE_Stage_b_WSns.sqlite, respectively.
The database uses SQLite (sqlite3) and is stored in the file {MW_STAGE Install}/log/{executable_name}_WSns.sqlite.
Specify 32 in [STAGE Common Settings → Launch App Specification].
About the Database Tables
sensor_data
Stores received data.
Column Name
Type
Description
_uqid
INTEGER
Sequential number used in the database
sid
INTEGERint32_t
Serial number stored as int32_t type.For example, a serial number “8123abcd” is stored as the integer value -2,128,368,691.
ts
INTEGERint64_t
Timestamp when the system received the packet, stored as int64_t.UNIX epoch (seconds since 1970).
ts_msec
INTEGER
Milliseconds part of the timestamp.
year
INTEGER
Year part of the local time from the timestamp.
month
INTEGER
Month part of the local time from the timestamp.
day
INTEGER
Day part of the local time from the timestamp.
hour
INTEGER
Hour part of the local time from the timestamp.
lid
INTEGER
Identifier such as LID assigned by the user.
lqi
INTEGER
Link Quality Indicator, an estimate of reception strength.
pkt_seq
INTEGER
Packet sequence number. The range of values depends on the firmware.
pkt_type
INTEGER
Type of wireless packet.2 PAL AMB6 ARIA1 PAL MAG*3 PAL MOT5 CUE0x101 App_Twelite*0x103 App_IO*Currently unsupported types
value
REAL
Measured value (definition varies by packet type).pkt_type->2,6: Temperature [°C]1: Magnet detection (00->No magnet, 01->N pole, 02->S pole)3,5: X-axis acceleration (average if multiple samples in packet) [G]0x101,103: Input IO bitmap (same as lower 8 bits of val_dio)
value1
REAL
Measured value (definition varies by packet type).pkt_type->2,6: Humidity [%]1: Unused3,5: Y-axis acceleration (average if multiple samples in packet) [G]0x101: ADC1 [V]103: Unused
value2
REAL
Measured value (definition varies by packet type).pkt_type->2: Illuminance [lx]6: Unused1: Unused3,5: Z-axis acceleration (average if multiple samples in packet) [G]0x101: ADC2 [V]103: Unused
value3
REAL
Measured value (definition varies by packet type).pkt_type->2: Unused6: Unused1: Unused3,5: Unused0x101: ADC3 [V]103: Unused
val_vcc_mv
INTEGER
Power supply voltage [mV]
val_dio
INTEGERint32_t
b0..b7: Values of DI1..DI8 (1 is LOW, 0 is HIGH level)b24..b25: Magnet value (if b28 is 1): 00->No magnet, 01->N pole, 10->S poleb28: If 1, magnet data is stored in b24..b25b31: Periodic transmission bit (magnet only)
In CUE mode, acceleration events are always output.
Regardless of the wake-up factor, a fixed number of acceleration samples are measured after waking. Events are determined based on the acceleration measurement results.
Event
Number
Description
Dice
1(0x00) .. 6(0x06)
Determined based on periodic wake-up and magnetic sensor wake-up.If a large acceleration is detected after waking,an undetermined event (0xFF) may be detected.
Move
16(0x10)
Occurs when the acceleration sensor detects acceleration above a threshold,resulting in a move or shake event.Move occurs when the measured acceleration change is relatively small,(acceleration change detected but no continuous acceleration change).
Shake
0x08
Occurs when the acceleration sensor detects acceleration above a threshold,resulting in a move or shake event.Shake occurs when the measured acceleration change is relatively large,(continuous acceleration changes detected).
Quantitative definitions for acceleration thresholds and event detection conditions are not provided.
Voltage
Power supply voltage of the module [mV].
Magnet
Displays the detected magnetic pole or no detection.
There is no function to indicate whether wake-up was caused by magnetic sensor detection.
Acceleration
Displays acceleration measured after waking.
Samples: Displays the number of acceleration samples, fixed at 10 samples.
Rate ID: Sample rate of acceleration, fixed at 04 (100Hz).
X, Y, Z: Acceleration on three axes. Calculated as the average of 8 samples. Unit is milli-G (1000mG = 1G = 9.8m/s²).
Example Screens
Example of Move Event Detection
Example of Shake Event Detection
2.2.2.1.4.2 - ARIA Viewer
Operation instructions for the ARIA Viewer screen
Windows
macOS
Linux
RasPi
This page contains capture images from an older version.
Example display of temperature and humidity data table
Overview
Interprets and displays messages received from TWELITE ARIA.
By programming the connected TWELITE with App_Wings, it can display information received from communication partners’ TWELITE devices (App_Twelite, TWELITE PAL, … as long as the application ID and frequency channel match, mixed operation is possible).
Glancer is an English word meaning a person who glances (i.e., takes a quick look).
Operation
Use by switching between the list display screen and the selection display screen.
List Display
Example of list display
Lists information from communication partners.
Displayed content includes message type, logical device ID, serial ID, LQI (Lq), power voltage (if included in the information), and timestamp.
Operation
Description
[ A ]
Move to the previous item in the list.
[ A ]Long press
Exit this screen and return to the previous menu.
[ B ]
Switch to selection display.
[ B ]Long press
Sort items.The sort key changes sequentially each time sorting is performed.
[ C ]
Move to the next item in the list.
[ C ]Long press
Control the TWELITE reset pin and reset it.
ESC
Exit this screen.
Selection Display
Example of selection display
By moving items and highlighting one in the list display, then performing a selection operation, you transition to this screen. It shows information related to a specific communication partner in order of arrival.
The number of received packets and the average LQI since selection are displayed.
Operation
Description
[ A ]
No assignment
[ A ]Long press
Exit this screen and return to the previous menu.
[ B ]
No assignment
[ B ]Long press
No assignment
[ C ]
No assignment
[ C ]Long press
Control the TWELITE reset pin and reset it.
ESC
Return to the list display screen.
2.2.2.1.5 - Commander
Operation instructions for the Commander screen
Windows
macOS
Linux
RasPi
Overview
Commander is a feature to send serial messages to TWELITE.
Operation
The first screen of the Commander displays important notes.
At the top of the screen, there are tabs represented by text, which you can navigate by clicking with the mouse to switch between tab screens.
Operation
Description
[ A ]
Move tab (left)
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
No assignment
[ B ]Long press
No assignment
[ C ]
Move tab (right)
[ C ]Long press
Control the reset pin of TWELITE to reset it.
ESC
Exit this screen and return to the selection screen.
Make sure the connected TWELITE has App_Twelite or parent/relay app (App_Wings) programmed, and after setting the application ID and channel, confirm that messages are being received from the communication partner.
Example display of the TWELITE tab
Item
Description
Destination
Specify the TWELITE to send to.If you are a child device, specify “Parent:0”.If you are a parent device, specify “All children = 0x78” or a specific child ID (can be specified from 1 to 8).
DI1..DI4
Settings state from DI1 to DI4.■ means selected (LOW = GND level), □ means (HIGH = VCC level).Please specify SEL in the next item.
SEL
Selection bits for each DI.(If 0, the DI specification is ignored; if 1, the specification is enabled.)
PWM1..4
Set the PWM duty ratio.0 corresponds to GND level, 1024 (100%) corresponds to VCC level.PWM ports set to N.A. will not be changed.(Note: On the MW-STA-KIT-0/MW-STA-SOLO-0 boards, PWM1 is pulled up to VCC, so the LED lights brightest at 0 and turns off at 100%.)
Commands are generated each time an item is changed. Pressing the send button will resend the command with the current settings.
Make sure the connected TWELITE has App_Wings programmed, and after setting the application ID and channel, confirm that messages are being received from the communication partner.
Example display of the NOTICE tab
Item
Description
Destination
Specify the ID of the TWELITE PAL to send to.Valid range is 1 to 8.
Color
Specify the lighting color from 7 colors.There are two types of white: one is RGB mixed color, and the other is a single white LED lit.
Brightness
Specify from 0 to 15. 0 means off.
Lighting/Blinking
Select lighting or blinking pattern.
Lighting Time
Automatically turns off after a certain time has passed since the command was issued.
Turn off (x)
Generate a turn-off message to turn off the LED.
Turn on (SPACE)
Send the current settings to turn on the LED.
Commands are generated each time an item is changed. Pressing the send button will resend the command with the current settings.
Display at the bottom of the screen
At the bottom of the screen, the timestamp when the command was generated and the command starting with : are displayed. The clipboard copies the contents of this screen.
2.2.2.2 - Write App Firmware
About the firmware writing function
Windows
macOS
Linux
RasPi
The firmware writing function allows you to write the TWELITE app (firmware).
Write pre-built .BIN files
Build from source files such as act and write
It eliminates the hassle of building source files, terminal disconnection, launching the writing utility, and terminal connection.
Automatically recognize TWELITE
After writing is complete, reset and then transition to interactive mode or terminal
From the list of projects, launch the project folder or environments like VSCode (except Raspberry Pi version)
From the list of projects, open related information web pages (except Linux and Raspberry Pi versions)
2.2.2.2.1 - Select from BIN
Operation instructions for the Select from BIN screen
Windows
macOS
Linux
RasPi
Overview
You can write pre-built applications ( .BIN files ).
Example of the Select from BIN screen
When you select the menu, a list of .BIN files will be displayed. Please select the firmware to write.
If you want to use a file other than the pre-prepared .BIN files, please store the file to be written in the following location before selecting the menu.
Platform
Location
Windows, macOS, Linux, Raspberry Pi
{MWSTAGE folder}/BIN
In the BIN folder, please store .BIN files built with TWELITE STAGE without renaming the files (they are stored under the build folder of each project).
This function identifies TWELITE (BLUE/RED, etc.) from the file name.
2.2.2.2.2 - act Build & Write
Operation instructions for the act build & write screen
Windows
macOS
Linux
RasPi
Overview
You can build and rewrite acts (act) written with the MWX library.
Example of sample act selection screen
This screen displays a list of projects using acts placed in the following path.
{MWSTAGE installation folder}/MWSTAGE/Act_samples
By default, it includes relatively small projects intended for use as samples.
Operation
You can build and write by selecting the project to write from the list.
After writing is finished, pressing ENTER or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
If you have enabled the setting to use VSCode (Open folder in code under app rewrite), it will not build but open the screen to write the .BIN file under build/.
Operation
Description
[ A ]
Menu selection up
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
Select
[ B ]Long press
Open related website in the OS default browser.(If registered in 000desc.txt in the project folder)
[ C ]
Menu selection down
[ C ]Long press
Open folder (project or related folder).You can set it to open with VS Code in the settings menu.
ESC
Exit this screen and return to the app rewrite menu.
Mouse click [Help]
Open related website.
Mouse click [Folder] or [VSCode]
Open related folder.
Mouse click [▽] or [△]
Move to next page or previous page.
2.2.2.2.3 - TWELITE APPS Build & Write
Instructions for operating the TWELITE APPS Build & Write screen
Windows
macOS
Linux
RasPi
Overview
You can build and write TWELITE APPS written with the TWENET C library.
Example of the app selection screen
This screen displays a list of projects located in the following path:
{MWSTAGE installation folder}/MWSTAGE/Wks_TweApps
By default, it includes relatively large-scale projects intended for immediate use.
Operation
By selecting the project to write from the list, you can perform build and write operations.
After writing is completed, pressing ENTER or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
If you have enabled the setting to use VSCode (Open folder with code in App Write), the build will not be performed, and the screen to write .BIN files under build/ will open instead. Screen
Operation
Description
[ A ]
Menu selection up
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
Select
[ B ]Long press
Open the related website in the OS default browser.(If registered in the project folder’s 000desc.txt)
[ C ]
Menu selection down
[ C ]Long press
Open folders (project, related folders).You can set to open with VS Code in the settings menu.
ESC
Exit this screen and return to the App Write menu.
Mouse click [Help]
Open the related website.
Mouse click [Folder] or [VSCode]
Open the related folder.
Mouse click [▽] or [△]
Move to the next or previous page.
2.2.2.2.4 - Act_extras
Operation instructions for the Act_extras screen
Windows
macOS
Linux
RasPi
Overview
You can build and rewrite acts written with the MWX library.
Example of the act selection screen
This screen displays a list of projects using acts placed in the following path:
{MWSTAGE installation folder}/MWSTAGE/Act_extras
Unlike act build & rewrite, this includes projects that perform relatively complex processes intended for sample use, or projects that use external open source libraries.
Operation
By selecting a project to write from the list, you can perform build and write operations.
After writing is complete, pressing ENTER or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
If you enable the setting to use VSCode (Open folder in code under App rewrite), the build will not be performed, and the screen to write .BIN files under build/ will open instead: screen.
Operation
Description
[ A ]
Menu selection up
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
Select
[ B ]Long press
Open the related website in the OS default browser.(If registered in the project folder’s 000desc.txt)
[ C ]
Menu selection down
[ C ]Long press
Open the folder (project or related folder).You can set it to open with VS Code in the settings menu.
ESC
Exit this screen and return to the app rewrite menu.
Mouse click [Help]
Open the related website.
Mouse click [Folder] or [VSCode]
Open the related folder.
Mouse click [▽] or [△]
Move to the next or previous page.
2.2.2.2.5 - Folder (Specify)
Write a specified firmware
Windows
macOS
Linux
By dragging and dropping a folder or .BIN file onto the TWELITE STAGE APP screen, you can write a specific project. Select the dropped target when performing build or write operations.
When you drop a .BIN file, the firmware list in the folder containing that file will be displayed, just as if you had dropped the folder itself.
2.2.2.2.6 - Last (Re-execute)
Re-execute writing the most recently written firmware
Windows
macOS
Linux
RasPi
Re-select the most recently rewritten or specified project.
Depending on the item, one of the following will be performed:
Rewrite the selected project
Redisplay the list of recently selected projects
2.2.2.2.7 - Build & Write Screen
Operation instructions for the build & write screen
Windows
macOS
Linux
RasPi
This section provides operation instructions for the screen displayed when building or writing a project.
During Build
This is the screen during the build (compile) process. The contents of the build command are output to the console screen. The ... in the middle of the screen indicates the number of files built, and the dark-colored display at the bottom shows the filenames currently being built.
Example of the screen during compilation
Build Error
If a build error occurs, a screen like the one above is displayed. You can execute a rebuild or display the error log. Also, after a certain timeout, it will return to the previous menu.
Example of error display screen
Only representative error messages are displayed on the screen. When the build fails, there may be cases where the error message is not displayed.
Operation
Description
[ A ]
No assignment
[ A ]Long press
Exit this screen and return to the previous menu.
[ B ]
Rebuild on error.
[ B ]Long press
No assignment
[ C ]
[ C ]Long press
Display the error log (Windows/macOS).The save location is {project folder}/build/builderr.log.
ESC
Exit this screen and return to the write menu.
ENTER
Rebuild on error.
During Write
When the build succeeds, the screen to write the firmware is displayed.
Example of write-in-progress screen
Write Failure
If writing results in an error, a screen like the one below is displayed.
Example of write failure screen
Operation
Description
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
Rewrite again(Returns to the previous write menu.Since the menu item is automatically selected,pressing [ B ] again will rewrite.)
ESC
Exit this screen and return to the write menu.
Write Complete
When writing completes successfully, a screen like the one below is displayed.
Example of write completion screen
From version 1.0.2 onwards, after firmware writing, a verify process is performed to read back and confirm the written content.
Operation
Description
[ A ]Long press
Exit this screen and return to the selection screen.
[ B ]
Reset the TWELITE and move to the interactive mode screen (or terminal screen depending on settings).
ESC
Exit this screen and return to the write menu.
2.2.2.3 - Interactive Settings Mode
Using Interactive Settings Mode
Windows
macOS
Linux
RasPi
Overview
From this screen, you can use the interactive mode of the connected TWELITE.
Example of the Interactive Mode screen
This screen behaves almost the same as a terminal, but adds functions specific to interactive mode, such as operations to transition to interactive mode and detection of exit from it.
The connected TWELITE must have firmware compatible with interactive mode pre-installed.
Since TWELITE input/output is used, if garbled characters occur in serial communication, transitions to and exits from interactive mode may not work as expected.
Mouse operations are not supported. Please use keyboard operations (cursor ↑↓ keys are usable).
You can also transition to and operate interactive mode using the Terminal.
In the terminal, the SET pin operation is not performed automatically. You need to manually set the SET pin to LO.
In the terminal, operations such as entering + + +, Alt(⌘)+I for interactive mode, and module reset Alt(⌘)+R are also defined.
Interactive Mode Screen Operation Flow
Below is an outline of the process flow.
[Set screen background to black]
↓
[Reset TWELITE (if controllable, SET=LO)]
↓
--YES--> [Operation screen]
↓timeout
[Input '+' three times]
↓
--YES--> [Operation screen]
↓timeout
[Operation screen] ※ This state is not interactive mode
[Operation screen]
↓
--> [Exit]
↓
--> [Exit]
↓
-> --NO-> [Exit]
↓ ↓
[Send input string to TWELITE]
↓
[Return to operation screen]
[Exit]
↓
[Reset TWELITE]
↓
[Exit screen] Exit the interactive mode screen and return to the previous screen
2.2.2.4 - Settings of TWELITE STAGE
Settings for TWELITE STAGE APP
Windows
macOS
Linux
RasPi
Overview
From this screen, you can configure various settings of the TWELITE STAGE APP.
Example of the settings screen
The menu on this screen cannot be operated with a mouse.
Also, changing the screen colors may make it difficult to see.
Some menu items explained below may not exist on certain platforms, but all are listed and explained.
Color settings other than the common menu are omitted from the explanation.
Root Menu
Common
Terminal
Standard App Viewer
Graph Viewer (Acceleration Real-time/Sensors)
Simple Monitor (CUA/ARIA/Glancer)
Commander
Write firmware
Interactive Settings Mode
Save Data Utilities (Dump/Erase)
Information
Common Settings
a: ( 0x00) Startup App Specification
G: ( 0x00) Screen Size and Drawing Method
F: ( ) Serial Device ID
f: (0x00FFFFFF) Foreground (Text) Color
b: (0x005A0032) Background Color
B: ( 115200) Baud Rate
Setting
Description
Startup App Specification
This setting determines which viewer app to switch to when TWELITE STAGE starts.The setting value is 1..{the number listed in the viewer app menu}.Note: If the serial device ID is not set,the startup will wait for input on the serial device selection screen.
Screen Size and Drawing Method
(Except for M5Stack version) Specified by two characters XY (X: screen size, Y: drawing method).X0:640x480 1:1280x720 2:1280x960 3:1920x1440 4:2560x1440 5:320x240Y0:LCD style 1:CRT style 2:Blur 3:Block
Serial Device ID
(Except for M5Stack version) Set by serial device name or a number 1..9.Note: The number indicates the device enumeration order.
Text Color / Background Color
Specify text and background colors.The common settings color values are inherited by other screens’ settings.If not set on other screens, the common settings colors are used.Colors are specified as 24-bit RGB hexadecimal values but are internally rounded to 16-bit 565 format.
Baud Rate
Set to avoid garbled display in terminals etc. when the TWELITE baud rate is not 115200.
Write Firmware
f: (0x00FFFFFF) Foreground (Text) Color
b: (0x005A0032) Background Color
j: ( 0) Number of make jobs at build time
v: ( 0) Open a folder with VSCode
l: ( 0) Disable LTO
n: ( 0) Screen after rewriting is completed
Setting
Description
Number of make jobs at build time
(Except for M5Stack version) Number of parallel jobs during build to shorten build time.Default 0 calculates jobs as (physical processor count - 1).A guideline is to set up to the number of logical processors.
Open a folder with VSCode
(Requires VSCode installation) Setting 1 opens folders using the code command (VSCode) instead of the OS standard folder window.The executable TWELITE_Stage_VSCode defaults to 1.
Screen after rewriting is completed
(Except for M5Stack version) Setting 1 opens the terminal instead of the interactive mode screen.Setting 2 returns to the rewrite menu.TWELITE_Stage_VSCode sets this to 2.
Disable LTO
(Windows only) Setting 1 disables LTO in the Windows compiler.LTO produces smaller binaries but takes longer to link.Disabling LTO results in faster linking.
Save Data Utilities
r: Read sector.
R: Read ALL sectors.
e: Erase sector.
E: Erase ALL sectors.
This screen is a utility for maintaining data save areas. It emulates EEPROM (64 bytes per sector, up to 60 sectors, 3840 bytes).
Setting
Description
r
Reads a sector.Input 0..59 to display the contents of the specified sector.
R
Input YES to read all sectors, but only the tail part is displayed.
e
Erases a sector (0xFF).Input 0..59 to erase the specified sector.
E
Input YES to erase all sectors.
On Windows, macOS, Linux, and Raspberry Pi, data is saved in {executable name}.sav (default TWELITE_Stage.sav file).
2.2.2.5 - Select SERIAL port
Select SERIAL port menu
Windows
macOS
Linux
RasPi
Overview
On this screen, you can (re)select the serial port.
Example of the serial port selection screen
Instead of using this screen, you can also switch the serial port with Alt(⌘)+0, Alt(⌘)+1,2,...
2.3 - Logging Function
Logging function between TWELITE and PC
Windows
macOS
Linux
RasPi
You can record serial communication logs between TWELITE and PC.
Operation
Start Recording
Press Alt(Cmd)+L.
Example of the log start screen
Stop Recording
While recording, press Alt(Cmd)+L again.
Example of the log stop screen
The log recording will stop, and the log file at that point will be opened using the OS default application (Notepad on Windows, Console.app on macOS).
On Raspberry Pi, only saving the log file is performed. There is no function to automatically open the log file.
Specifications
Log Recording
Strings received from TWELITE are recorded as-is.
Strings sent to TWELITE are recorded one character at a time.
On Windows, they are enclosed in 「 」, and on macOS / Linux / Raspberry Pi, they are enclosed in « ».
For example, «t» means that the character t was input from the keyboard.
Log Folder and File Name
Logs are saved in the {folder where the TWELITE STAGE APP executable is located}/log folder, with a file name based on the start date and time of the logging.
Press Alt(Cmd)+Shift+L to open that folder.
Example of the log output folder
3 - Detailed Specifications
Detailed specifications of TWELITE STAGE APP
3.1 - Detailed Settings with Command-line Arguments and ini Files
Detailed settings for TWELITE STAGE APP using command-line arguments and ini files
Command-line Arguments
Command-line arguments configure some detailed settings of the TWELITE STAGE APP.
Command-line Argument
Description
-E 0
Disables graphical effects such as fade-out.
-R {type}
Sets the rendering type with the {type} value.0: Default1: OpenGL2: DirectX (Windows) Metal (macOS)3: Software
-J
Enables the game controller.
-x {x_pos},-y {y_pos}
Sets the position of the TWELITE STAGE App graphical window at startup.{x_pos} and {y_pos} are the screen coordinates of the top-left corner of the window.
ini Files
ini files are used to configure basic settings of the TWELITE STAGE APP (such as referencing the MWSDK folder).
The ini file name is {base name of the TWELITE STAGE APP executable} + .ini. Usually, it is TWELITE_Stage.ini.
;;; Change the MWSDK reference.
; MWSDK=MWSDK
mwsdk=mwsdk2020_10
;;; Interface language
; LANG=en
;;; Window geometry
GEOM_X=200
GEOM_Y=100
Syntax
ini files are written as plain text files.
Keys and values are stored on a single line separated by = (e.g., KEY=value).
The key and value strings start at the beginning of the line (no spaces or other characters allowed before the key).
Spaces are not allowed between the key and the value.
Comment lines start with ; or # at the beginning of the line.
Settings
Key
Value
MWSDK
Changes the MWSDK folder. The default folder is MWSDK located in the same folder as the TWELITE STAGE APP executable. If you need to use an older or custom MWSDK, you can specify the folder name here.
LANG
LANG=en changes the user interface language from the default (Japanese) to English. This setting is carried over to the make parameter (TWE_LANG_PREF) and is reflected in the interactive mode display language setting of some firmware (apps) such as TWELITE_Apps.
GEOM_X, GEOM_Y
Changes the location where the TWELITE STAGE App window appears.
Running TWELITE STAGE APP with Different Settings
If you need different settings for the TWELITE STAGE APP, copy the executable to the same folder as the TWELITE STAGE APP and create an .ini file with the same name.
For example, to use the English interface, copy TWELITE_Stage.exe (note: .exe is the Windows executable extension) to TWELITE_Stage_en.exe and write the setting LANG=en in TWELITE_Stage_en.ini to create an executable with the English interface enabled.
TWELITE_Stage.exe
TWELITE_Stage.ini | No special settings
TWELITE_Stage_ja.exe | Copy of TWELITE_Stage.exe
TWELITE_Stage_en.ini | LANG=en is set.
3.2 - Environment Variables
Environment variables used by TWELITE STAGE APP
TWELITE STAGE APP internally sets environment variables to operate build programs such as make. There is no need to set environment variables beforehand.
Environment Variables Set Internally
Environment Variable
Description
MWSDK_ROOT
By default, the MWSDK folder located in the folder where the TWELITE STAGE APP executable is stored (that is, ../MWSTAGE/MWSDK) is specified. If MWSDK.ini is specified, the specified folder name is adopted.
MWSDK_TWENET_LIBSRC
For sample code and TWELITE APPS source code folders, definition files for Microsoft Visual Studio Code (VS Code) are pre-created. In these definition files, the library source code reference path is specified for code interpretation within the VS Code editor, and this environment variable is used for that purpose.If the MWSDK_TWENET_LIBSRC environment variable is properly set, code interpretation will work even in project folders outside of MWSDK, enabling features such as function name completion for the library. (Reference)
LANG=C
Explicitly set to make the toolchain messages appear in the default language (English).
PATH
On Windows, adds the PATH to the SDK-included msys utilities.
Used in VS Code configuration definitions. JOBS: Passes the number of parallel builds set in STAGE APP DISABLE_LTO: Disables LTO (
Windows
) LANG_PREF: The display language (JP: Japanese, EN: English) of the TWELITE STAGE APP is set.This setting is also inherited by the parameter (TWE_LANG_PREF) of make at build time.
Reference
Excerpt from .vscode/settings.json configuration example:
Definitions starting with "../../" are unnecessary when opening a project from the TWELITE STAGE app. These specify source reference paths in the default folder structure when the environment variable MWSDK_TWENET_LIBSRC is not set.
3.3 - Adding Project Descriptions with 000desc.txt
How to add project descriptions using 000desc.txt
When you create a 000desc.txt file in the project folder, TWELITE STAGE APP displays its contents in the project folder list.
Example display of 000desc.txt
The file should be written as plain text in UTF-8 format. There are two formats as follows.
Format 1
LED lights up when the switch is pressedact4 operates an act that lights up the LED when the switch connected to TWELITE DIP is pressed.https://mono-wireless.com/jp/products/act/index.html
The first line is the title line.
The following lines describe details.
If the last line starts with http, it becomes a link to a website.
Format 2
[JAPANESE]TITLE=act templateDESC=This file contains only empty setup() and loop() functions.Please use it to write a new act.URL=jp/MWX/content/Act_samples/README.html[ENGLISH]TITLE=act empty templateDESC=This act file only contains empty setup() and loop(),which is intended to write a new act.URL=en/MWX/content/Act_samples/README.html
This format is like an ini file. The item name starting from the beginning of the line and the = character define the item, and the content after = is the item’s content.
Item Definition
Details
[JAPANESE], [ENGLISH]
Block separators
TITLE=
Title line
DESC=
Description. Can include multiple lines with line breaks.
URL=
Link to a website or file
About URL specification
URL=
Details
Starting with https:, http:
Opens that address
Others
Specify a relative folder based on {MWSDK_ROOT}/docs/.If set as a/b/c.html, it is converted to {MWSDK_ROOT}/docs/a/b/c.html.
4 - License
About the license
The executable format of TWELITE_Stage distributed by Mono Wireless Inc. is subject to MW-SLA-1J,1E.
The source code is subject to MW-OSSLA-1J,1E. Please refer to the linked page for an overview.
If you build from the source code, operation under MW-OSSLA-1J,1E, which has more relaxed restrictions for non-commercial purposes, is possible.
Some distribution packages (as of 2020/10/9, only the M5Stack 0.8.9a package) apply a dual license of MW-SLA-1J,1E and MW-OSSLA-1J,1E. Please check the license description within the package.
Please note that for commercial use, you will need to select MW-SLA-1J,1E.
Open Source Components Used
We appreciate the open source projects that provided high-quality source code.
Name
Description
SDL2
Simple DirectMedia Layer Copyright (C) 1997-2020 Sam Lantinga
getopt
Copyright (c) 1987, 1993, 1994 The Regents of the University of California. All rights reserved.
regex
regex - Regular expression pattern matching and replacement By: Ozan S. Yigit (oz) Dept. of Computer Science York University
Depending on the platform, the latest version distributed and the latest version in the revision history may not match.
The latest version of the source code may not be registered at the above sites.
2.4.4 MWSTAGE2025_07 Release
Major Version Upgrade
Added support for TWELITE STICK
Enhanced serial port functionality
Added baud rate switching via ALT+B
Connection status now displayed in the title bar
Makefile error message handling
Extracts the message part ... from errors output in the format $(error <MWERRM>...</MWERRM>)
These error messages are intended to be used when attempting to build projects for unsupported architectures (e.g., GOLD only, or BLUE/RED only)
Support for language setting in interactive mode
Interactive mode language can now be specified at build time via TWE_LANG_PREF=(JP|EN)
When launching external tools (e.g., VSCode), the MWSDK_MAKE_LANG_PREF environment variable is now set
2.4.3
For projects with multiple configuration types located in subfolders (and not directly under the root build), folder listing is now limited to only those that contain a build/ directory, preventing unnecessary folders from being shown
Fixed a crash that occurred when error messages were too long during build errors
Changed the order of serial protocol checks for determining BLUE/RED/GOLD: now tries GOLD first (for GOLD-targeted SDK)
2.4.2
Added support for interactive mode transition control using the SET pin (CTS pin on MONOSTICK)
Behavior in TWELITE_Apps is as follows:
If SET pin is held for less than ~100ms → normal boot (prevents accidental interactive mode entry due to noise)
If held longer than the above → enter interactive mode on boot
If held for ~3 seconds or more → erase entire EEPROM on startup
Each app is informed of the interactive mode transition via a startup parameter
Apps receiving this parameter will, in principle:
Skip app-specific initialization
Skip interrupt handler setup, etc.
Automatically start interactive mode on UART0 at 115200 8N1
Suppress exit from interactive mode via +++
Under this spec, the STAGE app behaves as follows:
For regular transition to interactive mode, hold the SET pin for about 300ms
When holding [ C ] on the interactive mode guidance screen, SET pin is held for about 5 seconds
If Entering Interactive ... message is not received within timeout, fallback to trying +++ as per previous behavior
Additional code cleanup
2.4.1
Initial support for TWELITE GOLD
If a control command response from GOLD is received at startup, it’s recognized as GOLD; if it fails, control commands for the BLUE/RED series are attempted instead
1.3.8 MWSTAGE2022_08 Included Version
Major version upgrade.
Changed internal rendering resolution from 320x240 to 640x480 pixels
Added real-time graph for accelerometer sensor
Added sensor graph that saves sensor data and displays graphs
Supported English display
Changed main manuals to local HTML files
1.0.8 MWSTAGE2021_09 Included Version
There was a case where buttons [ A ] [ B ] [ C ] remained pressed even after the pointer moved away
STAGE APP sends CRLF to TWELITE when Enter is input
Updated Mac FTDI library to allow operation without serial intermediary program on Apple Silicon (M1)
Internally set PATH for msys toolset on Windows to prevent unexpected make calls
Allowed moving to the writing screen even if TWELITE is not connected (input B,R keys and specify the target TWELITE model)
When configured to use VSCode, selecting act or TweApps opens the writing screen for .bin files under build/ without building (build is done from VSCode)
Internally set several environment variables so that VSCode launched from TWELITE STAGE can refer to them, enabling proper builds and library resource referencing in VSCode
Sample code is stored under MWSDK folder, but dropping a folder for build target allows build and write operations for folders other than MWSDK (folder names must not contain spaces or Japanese characters)
Displayed internal folder settings and environment variable settings on the console screen at startup
Waited 1 second before exiting STAGE APP on termination
1.0.7pre2
Enhanced support for Raspberry Pi (1.0.7pre2)
Support for serial0 (TWELITE STAGE HAT)
Added build for Zero (build with supported libraries & disabled rendering fade feature)
Added build for X11 desktop
Made it usable with general FTDI devices (FT232, FT230). Firmware writing mode must be done manually
Added feature to display COM ports assigned in Windows by pressing c key on serial port selection screen
Allowed changing baud rate from 115200bps
Added command line option (-E 0) to disable rendering fade feature.
1.0.3 MWSTAGE2020_12 Included Version
Supported TWELITE CUE (parser and CUE viewer)
Enabled verification (comparison) during writing in the rewrite menu
Provisional support for Apple Silicon (TWELITE_Stage.command is a universal app; external command sersrv_ftdi.command and Tools are rebuilt Intel binaries runnable with Rosetta2; serial communication is slower due to external command)
Moved MWSTAGE/MWSDK/Tools to MWSTAGE/Tools (to allow direct use of MWSDK_COMMON repository)
TWELITE_Stage.ini (removes extension from startup filename and adds .ini) is loaded at startup to allow selecting MWSDK folder (makes it easy to switch old library sets)
Updated SDL2 library for screen rendering to 2.0.12 (Windows, MacOS, RaspberryPi)
Static build on Windows with no DLL files required
Set parallel build count for make -j to (number of physical CPUs - 1)
Explicitly reopened serial port in several places in rewrite menu to improve recovery when USB connection is disconnected due to device removal
When opening mwx or twesettings with Alt(Cmd)+Shift+m, t, opens folders listed in TWENET/usever.mk
Fixed issue where writing menu transition failed on first startup at /dev/serial0 on Raspberry Pi
Known Issues
Help message when pressing Alt(Cmd) at startup may not appear; can be shown by inputting Alt(Cmd)+0
Line wrapping may be broken when filenames are too long in rewrite menu
Apple Silicon operation has not been sufficiently tested
0.9.11 MWSTAGE2020_10, Raspberry Pi Version (Provisional)
(* This version is not comprehensively tested *)
Operation on Raspberry Pi
Other feature adjustments
0.9.9 - MWSTAGE2020_10 Included Version
Added [Web] button to the top-level menu to open related links in browser
Implemented folder, web, and VS Code open features for Linux version
Sometimes difficult to transition to writing menu when TWELITE frequently outputs UART