- RT-Thread, born in 2006, is an open-source, neutral, and community-based real-time operating system (RTOS). The software has the characteristics of very low resource occupancy, high reliability, and high scalability and can be greatly used in sensing nodes, wireless connection chips, and many resource-constrained scenes; it is also widely applied in the gateway, IPC, smart speakers, and many other high-performance applications.
- RT-Thread is also considered an IoT platform with its rich middle-tier components and great hardware and software ecosystem, with almost every key basic component required for IoT devices, such as network protocols, file systems, low power management, etc. It supports all mainstream compiling tools such as GCC, Keil, IAR, etc., and a variety of standard interfaces, such as POSIX, CMSIS, C++ application environment, Micropython, and Javascript, making it easy for developers to port a wide range of applications. RT-Thread also offers great commercial support to all the mainstream CPU architectures, such as ARM Cortex-M/R/A, RISC-V, MIPS, X86, Xtensa, etc,
✔ Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
✔ A variety of standard interfaces, such as POSIX, CMSIS, and C++ application environments.
✔ Has rich components and a prosperous and fast-growing package ecosystem.
✔ Elegant code style, easy to use, read and master.
✔ High Scalability. RT-Thread has high-quality, scalable software architecture, loose coupling, and modularity and is easy to tailor and expand.
✔ Supports high-performance applications.
✔ Supports all mainstream compiling tools such as GCC, Keil, and IAR.
✔ Supports a wide range of architectures and chips.
Hardware and Software ComponentsThe following are the tools utilized for this project
- Laptop
- RT-Thread Studio IDE
- RT-Thread×Renesas×LVGL HMI Board
- USB Type-C Data Cable
- Squareline Studio
A. System Requirements
Before beginning the installation process, please ensure that your computer meets the system requirements for the RT-Thread Studio IDE. These requirements typically include the following:
- Operating System: Windows, Linux, or macOS
- RAM: 4GB or higher (recommended)
- Disk Space: Several GB of free space
- Java Runtime Environment (JRE): Installed (preferably version 8 or later)
- Please note that we will use a Windows 10 Operating System in this procedure.
B. Download and Install RT-Thread Studio IDE
- Click the provided link to visit the RT-Thread Studio IDE download page: RT-Thread | Download
- Open the downloaded installer or .exe file and follow the on-screen instructions.
- Wait for the installation to complete. Once finished, you can start using the RT-Thread Studio IDE.
- Launch RT-Thread Studio.
- Click on "SDK Manager." Install the "Reneses -> HMI-Board" and "Debugger_Support_Package -> PyOCD" packages. After the installation, close the SDK Manager.
- Navigate to the "File" tab in the upper left corner of RT-Thread Studio and select "New -> RT-Thread Project."
- Choose "Base on Board" and select "HMI-Board" with the type set to "Example." You can choose from one of the available examples: hmi-board-ebike, hmi-board-factory, hmi-board-lvgl, or hmi-board-video. Create a project name and click "Finish." You can refer to the project name based on what the project is about to be distinguished.
- Proceed to compile and build the project. Ensure that the build process is completed without issues.
- Click the "Flash Download" button located between the "Window" and "Help" tabs, or use the shortcut "CTRL+ALT+D" to upload the project to your HMI board. Please be patient, as this process may take some time.
- The GUI will be automatically implemented once the project is uploaded to the HMI board.
Credit: The documentation from RT-Thread guided the execution of this part. See youtube link: https://www.youtube.com/watch?v=YGR2pw3ZXtc
III. Installation Procedure of the SquareLine StudioA. System Requirements
Before initiating the installation, verify that your computer meets the system requirements for SquareLine Studio, which typically include:
- Operating System: Windows, Linux, or macOS
- RAM: 4GB or higher (recommended)
- Disk Space: Several GB of free space
- Java Runtime Environment (JRE): Installed (preferably version 8 or later)
In this procedure, we will be using a Windows 10 Operating System.
B. Download and Install SquareLine Studio
- Access the download page for SquareLine Studio: SquareLine Studio | Download.
- Open the downloaded installer or .exe file and follow the provided instructions.
- Wait for the installation to complete. Once done, you can start using SquareLine Studio.
- Sign up and register a free account in SquareLine Studio.
- Launch SquareLine Studio.
- Log in with your registered account credentials.
- Upon logging in, click the "Create" button to begin your GUI project using SquareLine Studio.
- Design your GUI project according to your preferences. The design should be 480x272 to fit the screen of the HMI display. The preferred color depth is 16-bit, but it is important to ensure all GUI assets maintain the lowest possible quality without compromising their visual appeal.
- Once the design is complete, export your project to your desired location.
- Note: You can create GUI assets using other design software such as CANVA, Adobe Photoshop, and Paint App. Make sure the image size is 480x272, which is compatible with the HMI display. Also, avoid high-quality images to avoid potential issues during uploading and integration.
- Open the folder containing your exported SquareLine Studio Project.
- Copy all the files from that folder and paste them into the folder located at "RT-thread project -> board -> lvgl." This step is straightforward since that destination folder contains only one folder, along with "lv_conf.h," "lv_port_disp.c," "lv_port_indev.c," and "SConscript." Replace all the files in that destination.
- Compile and build your RT-Thread project by clicking the "hammer" button.
- Once the build is complete, use the "Flash Download" feature to upload your RT-Thread project to the HMI board. Please be patient, as this process may take some time to finish.
- The GUI will be automatically implemented after successfully uploading the project to the HMI board.
A. GUI Screens
B. Implemented GUI | Demonstration
C. Development
This project is also available in my medium account. Here’s the link: https://medium.com/@arb.alce/awd-irrigation-water-level-monitoring-using-embedded-gui-70aabf569b3f
Thank you!
Comments
Please log in or sign up to comment.