This article explains how to use the RT-Thread QEMU BSP on both Windows and Linux platforms, and how to run the RT-Thread GUI example. It provides a detailed guide for developers who want to test RT-Thread without physical hardware.
1. Purpose and Structure of This Paper
1.1 Purpose and Background
Embedded software development often relies on physical development boards. However, when such hardware is unavailable, virtual machines like QEMU can be used as alternatives. QEMU supports cross-platform virtualization and can simulate various development boards. To help users experience RT-Thread without a board, RT-Thread has developed a QEMU-based BSP for the ARM vexpress-a9 platform. This article focuses on using the qemu-vexpress-a9 BSP on both Windows and Linux systems.
1.2 Structure of This Article
The article first covers the setup and usage of the qemu-vexpress-a9 BSP on Windows, followed by a detailed explanation of its implementation on Linux.
2. Using qemu-vexpress-a9 BSP on Windows Platform
2.1 Preparation
To get started, you need the RT-Thread source code and the RT-Thread Env tool. The Env tool includes a compiler and QEMU, so no separate installation is required on Windows. Download the RT-Thread source, locate the `qemu-vexpress-a9` folder in the BSP directory, and ensure it contains drivers for LCD, keyboard, mouse, SD card, Ethernet, and serial ports.
2.2 Running the qemu-vexpress-a9 BSP Project
1. Open the `env` folder and launch the appropriate console (32-bit or 64-bit) via `console.exe`.
2. Use the command `cd d:\project\rt-thread\bsp\qemu-vexpress-a9` to navigate to the BSP directory, then run `scons` to compile the project.
3. After compilation, run `qemu.bat` to start the virtual machine. A warning from 360 Security may appear; allow the program to run. The white area represents the virtual LCD screen.
4. You can now write and run GUI-related code, which will be displayed on the virtual screen.
5. Use the `mkfs sd0` command to format the virtual SD card into a FATFS file system.
6. Restart the VM to load the file system and explore the commands provided by RT-Thread.
2.3 Running the RT-Thread GUI Example
1. Disable the QEMU VM and return to the Env console. Use `menuconfig -s` to enable automatic package updates.
2. Enter `menuconfig`, navigate to `RT-Thread Components > RT-Thread UI Engine`, and enable the UI Engine example.
3. Save the configuration and recompile the project with `scons`.
4. Run `qemu.bat` again to see the GUI sample code displayed on the virtual screen.
2.4 Debugging the qemu-vexpress-a9 BSP with Eclipse
1. Install the QEMU debugging plugin from the Eclipse Marketplace.
2. Configure the debug settings in Eclipse, select the debug file, and set breakpoints.
3. Run `qemu-dbg.bat` in the Env console to start the VM in debug mode.
4. Use Eclipse to connect and debug the project.
3. Using qemu-vexpress-a9 BSP on Linux Platform
3.1 Preparation
Download the RT-Thread source with `git clone https://github.com/RT-Thread/rt-thread.git`. Install QEMU, SCons, and the compiler using `sudo apt-get install qemu scons`. Modify the `rtconfig.py` file in the `qemu-vexpress-a9` folder to point to the correct compiler path.
3.2 Configuring the Project with menuconfig
Run `scons --menuconfig` to open the configuration interface. Use `pkgs --update` to download and install packages. The `.env` folder is created automatically, and you can execute `source ~/.env/env.sh` to configure environment variables.
3.3 Running the qemu-vexpress-a9 BSP Project
1. Compile the project with `scons`.
2. Add execute permissions to `qemu.sh` using `chmod +x qemu.sh`.
3. Run `./qemu.sh` to start the virtual machine. The terminal displays RT-Thread startup logs, and the white window shows the virtual LCD screen. Users can run GUI examples and debug projects similarly to the Windows version.
19MM Key Switches
19mm key switches
19mm key switches, ie, Key Switch lock, is gradually increase market share with its Diverse functions, accurate operation and Wide range of applications
This 19mm key switches could have 3 position key switch, 4 Position key Switch, which means it could have stronger power to support industrial and other bigger equipment. The exclusive technology of reset functions, multi-position rotation angles are not available in all walks of life,only we can have the technique to realize these.

As for the quality, this 19mm key switches have via UL authentication. In terms of green environmental protection, we adhere to the concept of sustainable development from the procurement of raw materials to the shipment of finished products. Meanwhile, we have professional environmentalist in charging of the whole production system, ROHS environmental protection providing PPAP report for our customers.
At present, our company's power key switches matching detection equipment is roughly as follows:ROHS testing machine, projector, life testing machine, push-pull testing machine, secondary element microscope, power testing machine, salt spray testing machine, etc.
With a sound quality control system and reliable detection equipment, we has created a globally reliable power key switch and has become a trusted producer of electrical key switches.
Key Switches,Key Switch Lock,Lock Switch,Power Lock Key Switch,Power Switch Lock,Power Lock Switch,Power Key Lock,19Mm Key Switches,4 Position Slide Switch,19Mm Push Button Key Switch,19Mm 3 Position Key Switch
YESWITCH ELECTRONICS CO., LTD. , https://www.yeswitches.com