Notes When Installing on Raspberry Pi
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/serial0may fail to operate. - Operation of
/dev/serial0on 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
gettyrunning 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.
The USB device IDs are as follows:
- Vendor ID
0x0403 - Product ID
0x6001(MONOSTICK, TWELITE R) or0x6015(TWELITE R2)
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
Notes on buster
It is necessary to enable OpenGL-related drivers.
- Select Advanced Settings → A2 GL Driver → G2 GL (Fake KMS) in raspi-config
- Install the libgles-dev package
Raspberry Pi OS (bookworm)
As of June 2024, Raspberry Pi OS (32bit, bookworm) has a bug where pin control cannot be performed and modules cannot be recognized or operated due to Linux kernel updates.
Also, in bookworm, startup failures due to errors related to libccm and others have been confirmed, but may be resolved by running the following commands.
sudo apt update
sudo apt install --reinstall libraspberrypi0 libraspberrypi-dev libraspberrypi-doc libraspberrypi-bin
At this time, rebooting may cause lightdm to fail to start.
In that case, please try installing raspberrypi-ui-mods.
sudo apt update
sudo apt install raspberrypi-ui-mods
We apologize for the inconvenience, but please use Raspberry Pi OS (32bit, bullseye) for the time being.
Addendum: A beta version of the TWELITE STAGE app compatible with Raspberry Pi OS (bookworm) has been created.
[How to apply the 32-bit patch]
cd MWSTAGE
wget https://dist.twelite.net/sdk/TWELITE_Stage_Wayland.run.zip
unzip TWELITE_Stage_Wayland.run.zip
./TWELITE_Stage_Wayland.run
- Main file: TWELITE_Stage_Wayland.run.zip
- SHA256:
76da281f80dc998fde1acb9eeb4d5168179f810b03342feb8b3e8ad644a978a2
- SHA256:
[How to apply the 64-bit patch]
For the 64-bit version, the compiler is also replaced with the 64-bit version.
cd MWSTAGE
wget https://dist.twelite.net/sdk/TWELITE_Stage_Wayland_64.run.zip
unzip TWELITE_Stage_Wayland_64.run.zip
mv Tools/ba-elf-ba2-r36379 Tools/ba-elf-ba2-r36379-bkup32
wget https://dist.twelite.net/sdk/ba-elf-ba2-r36379_aarch64.tgz
tar -xzf ba-elf-ba2-r36379_aarch64.tgz
mv ba-elf-ba2-r36379 Tools/
./TWELITE_Stage_Wayland_64.run
- Main file: TWELITE_Stage_Wayland_64.run.zip
- SHA256:
2f784b3d667ccb08b9cc9fe5eda8cd48e37c2e11c1747718087fe279be693a0f
- SHA256:
- Toolchain: ba-elf-ba2-r36379_aarch64.tgz
- SHA256:
81a9546c2d1d77344358426a1eefa275a08e24d8b497d2faefce07d497776a45
- SHA256: