GUI Guiderナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

GUI Guider Knowledge Base

ディスカッション

ソート順:
The following document describes the migration process of a GUI Guider project based on the older LVGL library 8.3.10, to the newer LVGL library 9.2.1 that is supported on GUI Guider v1.9.0+. We will take the CoffeePourAnimation example project as a basis to illustrate this process. For demonstrative purposes, we will create the project on GUI Guider 1.8.0, which was the last GUI Guider version that only supported LVGL 8.3.10, and migrate it to GUI Guider 1.10.0, currently the latest version of GUI Guider, that supports LVGL 9.2.1. In this case, we will use a MIMXRT1060-EVKC with a RK043FN66HS-CTG display. With the project created, the very first thing we have to make sure to do is generate the GUI C code using the ‘Generate Code’ button: Note that the project created will be based on the SDK version 2.16.000: This SDK version is what contains the LVGL libraries, which are v8.3.10. If we want to upgrade the LVGL libraries to the latest v9.2.1, we need to update the SDK as well. But simply importing the project to a newer GUI Guider version will not update the SDK. This will just update the project file, without changing any of the underlying software package. In order to make sure both the SDK and the LVGL libraries get updated, we will use MCUXpresso IDE. Here, we can create a new base project that uses the SDK version 25.06.00 and replace only the GUI with the one of the older projects. This will ensure we have a v9.2.1 LVGL based project, with the GUI from the previous project. Why use specifically v25.06.00 of the SDK? Because this is the version of SDK that the latest GUI Guider (v1.10.0) uses to create projects based on LVGL v9.2.1. In order to do this, first import the LVGL example for the board we are using (in this case, the MIMXRT1060-EVKC). This new project will be used to ensure the newest LVGL library is in place: Make sure to import the example project named: "lvgl_guider". The resulting project will be created, along with the following folders and files. The actual GUI, is stored on the “custom” and “generated” folders, so these are the folders that have to be replaced to bring the old GUI on the new project: In order to replace them, navigate to both the original GUI Guider project folder, as well as the MCUXpresso lvgl_guider example project folder. Delete the ‘custom’ and ‘generated’ folders from the lvgl_guider example, and drag-and-drop these same folders from the GUI Guider project into the MCUXpresso example project: After doing this, the new ‘generated’ and ‘custom’ folders will not be detected as source folders for the project, since they were copied from an external project. In order to add them as source folders, navigate to Project Properties > C/C++ General > Paths and Symbols, click on ‘Add Folder…’ and select both ‘custom’ and ‘generated’ folders before clicking OK: After following either of these two processes, the old GUI Guider project will have been updated to the new SDK, which also has the new LVGL 9.2.1 libraries. That said, due to major changes on the APIs of LVGL v8 and v9, building the project will most likely result in compilation errors. Most changes of the LVGL libraries are addressed on the official LVGL documentation, specifically the following migration guide from v8 to v9: Changelog — LVGL documentation The following section will describe the process to address the specific changes from the CoffeePourAnimation example project from LVGL v8.3.10 to v9.2.1.   Adjusting for 9.2.1 LVGL library changes: First of all, if after compiling the project, the following error shows up: fatal error: gui_guider.h: No such file or directory It means that the code generated by GUI Guider was not done correctly. If that is the case, one must repeat the whole process described earlier, making sure to click on the “Generate Code” in C, as mentioned previously. Specifically for this example  CoffeePourAnimation GUI, we get an error stating: fatal error: extra/widgets/animimg/lv_animimg.h: No such file or directory This is because the path to the “lv_animimg.h” header file was changed on LVGL v9. In fact, that LVGL file was also renamed to “lv_animimage.h”. Therefore, we have to change the following line in “gui_guider.h”. From: #include "extra/widgets/animimg/lv_animimg.h" To: #include "src/widgets/animimage/lv_animimage.h"   The next error that shows up is one that is present for all of the image files: fatal error: lvgl/lvgl.h: No such file or directory This is because previously, on LVGL v8, the include path was set to the parent directory of the “lvgl.h” file (meaning that the inclusion of this header file had to be “lvgl/lvgl.h”). This is no longer the case, so we can define the following macro in order to fix the inclusion issue and simplify it to: #include “lvgl.h”. The macro to be defined is LV_LVGL_H_INCLUDE_SIMPLE. In project properties, under C/C++ Build > Settings > Tool Settings > MCU C Compiler> Preprocessor, click on the “Add…” button, and add that macro: After completing this, the next errors that are shown after a compilation are all related to the images of the GUI. There were several format changes on the image headers from LVGL v8 to v9. This means that the “.c” array files that were generated on GUI Guider will no longer be compatible with the new LVGL libraries. Because of this, the images have to be re-converted for LVGL v9.2.1. This can be achieved by using the official LVGL image converter tool, either online here: Image Converter — LVGL, or via a python script found here: lvgl/scripts/LVGLImage.py at master · lvgl/lvgl · GitHub. All of the images used on the GUI should be located under the “import” folder of the main project’s folder location. Once all of the images from the project have been converted to the LVGL v9 format, simply replace the .c array files located under the project folder > generated > images, with the newly generated ones: Although several changes were made to the API of the LVGL library between v8.x and v9.x, LVGL comes with an API map file, that maps new API functions to older ones for retroactive compatibility. As stated on the aforementioned Changelog — LVGL documentation, for example, “lv_disp_... is renamed to lv_display_...”, and the “lv_api_map_v8.h” file addresses this change, so that the old v8 function calls that our GUI uses, will still work on the new v9 LVGL: That said, there might be some exceptions that fly under the radar. In the specific case that we are looking at, it happens on the following line under the “events_init.c” file: lv_animimg_del(guider_ui.coffeePour_animimg_coffee); In this case, the API map file does not currently contain an alias for the new function call of LVGL v9, therefore we have to adjust it manually. This might happen on other functions for specific GUIs being imported. Thankfully MCUXpresso does provide suggestions that might point to the right function to replace them with: Also, the next change is necessary on the “events_init.c” file, which instead of doing a direct call to “animimg1->dsc”, we do it through the following call. From: const void **coffee_imgs = animimg1->dsc; To: const void **coffee_imgs = lv_animimg_get_src(guider_ui.coffeePour_animimg_coffee); Finally, the lv_line_set_points() was changed from using the following arguments on v8: void lv_line_set_points(lv_obj_t *obj, const lv_point_t points[], uint16_t point_num) To these arguments on v9: void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num)​ Therefore, the following change has to be made on “setup_scr_coffeePour.c”. From: static lv_point_t coffeePour_line_right[] = {{0, 0},{0, 180},{0, 90},{120, 90},}; static lv_point_t coffeePour_line_left[] = {{120, 0},{120, 180},{120, 90},{0, 90},}; To: static lv_point_precise_t coffeePour_line_right[] = {{0, 0},{0, 180},{0, 90},{120, 90},}; static lv_point_precise_t coffeePour_line_left[] = {{120, 0},{120, 180},{120, 90},{0, 90},}; With these changes, the CoffePourAnimation GUI Guider project has been migrated from using LVGL v8.3.10 to v9.2.1. Happy migrating!
記事全体を表示
Reducing image resource usage in embedded GUI applications When developing embedded GUIs, many projects encounter a familiar challenge: image resources begin consuming a significant amount of Flash before the interface becomes complex. Icons, buttons, status indicators, logos, and other assets may seem small individually, but their cumulative footprint can reduce the space available for future features. I8 (Indexed 8-bit) is an effective option for reducing image storage while preserving acceptable visual quality. This guide explains the fundamentals of I8, its suitable use cases, and practical recommendations for using it in GUI Guider projects. 1. Why Use the I8 Image Format? In MCU-based projects, image resources often occupy a large portion of Flash. For assets with a limited number of colors, such as icons, status images, logos, and industrial HMI elements, I8 can reduce storage usage while preserving the essential visual appearance. I8 stores an image using a pixel-index and color-palette mechanism. Each pixel stores a one-byte index, which maps to an actual color in the palette. This makes I8 especially suitable for UI assets with concentrated color sets, clear boundaries, and highly graphical content. Storage Comparison of Common Image Formats Image Format Typical Storage per Pixel Suitable Use Cases RGB888 3 bytes Images with rich colors and high color-fidelity requirements RGB565 2 bytes Common MCU displays balancing visual quality and resource usage ARGB8888 4 bytes Images requiring an alpha channel and high-quality rendering I8 1 byte + palette Icons, logos, and HMI elements with a limited color set 2. What Is an I8 Image? I8 stands for Indexed 8-bit. Instead of storing complete color information in every pixel, an I8 image stores an 8-bit index that points to a color in a palette. Because an 8-bit value represents up to 256 indices, an I8 image supports a maximum of 256 colors. This format is well suited to UI assets with limited colors, sharp boundaries, and graphic-style content. Key Advantages Smaller image files and lower Flash consumption. Lightweight resource loading for memory-constrained MCUs. Well suited to icons, industrial HMI elements, status images, and logos. More flexible UI resource management when combined with the LVGL 9.4 image display mechanism. Limitations Supports no more than 256 colors. Not suitable for photographs, video frames, product renderings, or other color-rich assets. Images with excessive colors may show banding, color distortion, or unnatural transitions after conversion. 3. Recommended Workflow in GUI Guider Step 1: Prepare the Image Resources Prefer PNG assets with a limited number of colors. Before importing an image, check whether it contains excessive gradients or photographic content. Step 2: Import Images into GUI Guider Add the image resources through Resource Manager and select an appropriate color format based on the display requirements of the project. Step 3: Select the I8 Color Format Convert suitable resources to I8 and preview the visual result in GUI Guider. Step 4: Validate in the Simulator Use GUI Guider Simulator to check color rendering, transparent regions, edge transitions, and the overall appearance of the page. Step 5: Generate Code and Validate on the Target After confirming that the result meets the requirements, generate the code and verify the application on the target development board. 4. Resource Usage Comparison: I8 vs. RGB565 The following theoretical estimates illustrate the resource usage of different formats. Actual size depends on image content, palette size, compression, and project configuration. Test Resource Image Format Theoretical Data Size 128 × 128 icon RGB565 Approximately 32 KB 128 × 128 icon ARGB8888 Approximately 64 KB 128 × 128 icon I8 Approximately 16 KB + palette From a resource-budget perspective, I8 reduces image storage when the color count can be controlled. The cumulative savings become more significant in HMI projects that contain many icons and status images. 5. Important Considerations When Using I8 1. Prefer Images with Fewer Than 256 Colors The core limitation of I8 is the palette size, so images with fewer colors are the best candidates. 2. Always Check the Visual Result After Conversion Even when an image contains relatively few colors, verify the result both in GUI Guider Simulator and on the target hardware. 3. Pay Attention to Transparency and Edge Transitions For images with transparent or anti-aliased edges, check for jagged borders, artifacts, or unnatural colors after conversion. 4. Do Not Convert Every Image Blindly I8 is an optimization technique, not the default choice for every asset. Complex backgrounds and photographic resources should continue to use a more appropriate color format. 6. Project Practice Recommendations In the GUI Guider Air Conditioner and Agriculture Control templates, selected images use I8 to save storage space and enable deployment on the FRDM-MCXN236 development board. Set suitable icons and status images to the I8 format. Compare the visual quality and resource size before and after conversion. After code generation, confirm that generated resources use the expected image format. Validate visual quality, refresh performance, and memory usage on the target platform. Example 1: Air Conditioner The Air Conditioner application template contains many animations and small icons. The comparison below shows ARGB8888 and I8 results. While maintaining image quality, I8 saves approximately 950 KB, allowing the application to run on the FRDM-MCXN236 development board.     Figure 1. Air Conditioner comparison: I8 (left) and ARGB8888 (right). Example 2: Agriculture Control In the Agriculture Control application template, using I8 saves approximately 16.5 KB of storage.     Figure 2. Agriculture Control comparison: I8 (left) and ARGB8888 (right). Conclusion For small and medium-sized HMI projects on platforms such as MCX and i.MX RT, I8 is a practical method for optimizing image resources. It is particularly useful when a project contains many icons, status indicators, menu graphics, and decorative elements. Applied selectively and validated carefully, I8 can release more Flash space while maintaining an appropriate visual experience.
記事全体を表示
In recent years, Zephyr has gained strong momentum in embedded development. With broad hardware support, an active open-source ecosystem, and flexible extensibility, it is increasingly being used in consumer electronics, IoT devices, and industrial control systems. At the same time, as embedded products place higher demands on graphical user interfaces, developers are looking for more efficient ways to design GUIs and deploy them quickly on Zephyr-based platforms. This article uses GUI Guider 2.0.1, the i.MX RT1064-EVK development board, and the RK043FN66HS-CTG display as an example. It walks through the complete workflow, from UI design and Zephyr application export to project build, flashing, and runtime verification, so you can get your designed interface running on the board with confidence. Let’s start with the development environment and complete this hands-on GUI Guider and Zephyr workflow step by step. 1. Set Up and Verify the Zephyr Development Environment Before getting started, follow the Zephyr development environment setup section in the official GUI Guider User Guide. Then use an official sample to confirm that the target board can be built, flashed, and run successfully. 2. Generate and Export the Zephyr Application 1. Create a Project and Generate Code After creating an i.MX RT1064-EVK-based project in GUI Guider and completing the UI design, click Generate Code to generate the application code. 2. Export the Zephyr Application Click OS > Zephyr to export the application to the target directory in your Zephyr workspace, for example: <zephyr-workspace>/gui_guider_demo 3. Check the Exported Files After the export is complete, the application directory should contain the following files and folders: gui_guider_demo/ ├── CMakeLists.txt ├── prj.conf └── src/     ├── main.c     ├── custom/     └── generated/ CMakeLists.txt: defines the Zephyr application build entry point and specifies the source files to compile. prj.conf: configures options such as LVGL, memory, and thread stack settings. src/main.c: the application entry file, responsible for initializing the UI and starting the application logic. src/custom/: stores custom business logic to avoid being overwritten when code is regenerated. src/generated/: stores UI code automatically generated by GUI Guider. Direct modification is not recommended. 3. Build and Flash the Zephyr Application Open a terminal, go to the root directory of the exported Zephyr application, and run the following commands: west build -p always -b mimxrt1064_evk --shield rk043fn66hs_ctg . west flash Note: The . in the command indicates the current application directory. This applies to Windows, Linux, and macOS. 4. Verify the Runtime Result Runtime verification: After flashing is complete, check that the screen displays the designed UI correctly and that touch interactions respond as expected. If these checks pass, the deployment workflow from GUI Guider to Zephyr is working properly. Common issues: No display output or abnormal UI behavior: check the serial log, display shield configuration, and display resolution settings in the GUI Guider project. Out-of-memory errors during build or runtime: increase CONFIG_LV_Z_MEM_POOL_SIZE in prj.conf as needed. Main thread stack overflow or unexpected reboot: increase CONFIG_MAIN_STACK_SIZE. After updating the configuration, rebuild and flash the application again. The exact values should be determined based on the error logs, UI complexity, and available hardware resources. 5. Establish a Repeatable UI Iteration Workflow After the first build and deployment are complete, you can iterate on future UI changes using the following workflow: Regenerate code → Export Zephyr application → Build → Flash → Verify   To prevent custom logic from being overwritten when code is regenerated, keep business logic in the custom code area. It is also recommended to put both the GUI Guider project and the exported Zephyr application under version control. Summary GUI Guider provides a complete path from UI design to Zephyr application export. Once the initial environment setup is complete, future UI updates only require repeating the generate, export, build, and verify workflow. This can significantly reduce the effort required for UI iteration and board-level deployment.
記事全体を表示
Bridging design and engineering to move embedded GUI projects from concept to implementation faster   1. Why a Smoother Path from Design to Embedded GUI Matters In embedded GUI projects, the interface design is often completed in Figma, while the engineering implementation still needs to be rebuilt in GUI Guider by creating widget hierarchies, configuring resources, and validating the final result. For projects with many screens or frequent design iterations, this process can be repetitive and may introduce gaps between the design intent and the implemented interface. Figma to GUI Guider offers a structured workflow that helps convert Figma designs into GUI Guider project assets. It maps Figma layers and components to LVGL widgets, generates GUI Guider project JSON, and exports a project package that can be imported into GUI Guider. The converted result provides a practical engineering starting point, while developers can continue editing, simulating, and validating the project in GUI Guider. Positioning This plugin is designed to shorten the initial conversion path from design handoff to engineering implementation. Figma designs should be treated as implementation references, rather than a complete guarantee of embedded runtime behavior. Actual projects still need to be adapted and validated against the resource constraints and rendering capabilities of the target platform.   2. How the Plugin Connects Design and Engineering Capability Description Read the Figma design tree Displays the Figma Design Tree in the plugin panel, helping developers review the node hierarchy of the design. Configure LVGL type mapping Sets the appropriate LVGL widget type for each design node and controls whether the node is included in conversion. Generate GUI Guider project JSON After conversion, previews the generated GUI Guider project JSON in the output area. Export the project package Exports a zip package via Download, including the converted project files and related image resources. Import into GUI Guider After extracting the exported package, import the .guiguider file in GUI Guider through Import Project and continue development. 3. Quick Start: Running the Plugin in Figma The Figma to GUI Guider plugin is available on Figma Community and can be launched directly from the Figma desktop app or browser version, without manually downloading a plugin package. The current release supports Windows. Open the Figma desktop app or browser version and sign in to your Figma account. Go to the Figma to GUI Guider plugin page, or search for the plugin name in Figma Community. On the plugin page, click Open in… to run it directly, or save it to your account for future use. Open the target design file and launch the plugin from the Plugins menu. You can also right-click on the canvas and run it from the Plugins menu. 4. Understanding the Plugin Interface After the plugin is launched, it appears as a panel inside the Figma workspace. For first-time users, we recommend becoming familiar with the key areas of the interface before configuring mappings and running the conversion.   Figma Design Tree: Shows the layer and component hierarchy of the current design file. Each node can be configured with an LVGL type and conversion status. Design Node: Displays the node name and Figma type, and uses the LVGL Type Selector to define the widget type after conversion. Refresh / Convert: Refresh reloads the current Figma file structure, while Convert generates the output based on the current mapping configuration. About: Provides plugin information, version details, support contacts, and reference links. GUI Guider Project JSON: Shows the generated project JSON after conversion, making it easy to quickly review the structure. Clear / Copy / Download: Clears the output, copies the JSON, or exports the project zip package and image resources. 5. Recommended Workflow: Review Mapping Before Generating the Project When the plugin is opened for the first time, it generates an initial mapping based on the Figma nodes. Instead of converting immediately, reviewing and adjusting the node mappings first usually produces a project structure that better matches engineering expectations. 1 Review the automatic mapping Browse the design tree and confirm that text, buttons, images, and other nodes are assigned appropriate LVGL widget types.   2 Adjust widget types If the automatic mapping does not meet expectations, update the node type through the Type Selector. Mapping settings are saved in the Figma project.   3 Control the conversion scope Use Disable in Conversion for nodes that should not be included in the output. Disabled nodes will not appear in the generated JSON, while their child hierarchy is preserved.   4 Run Convert After configuration is complete, click Convert to generate the GUI Guider project JSON and review the result in the output area.     6. Generate the Project and Import It into GUI Guider After conversion is complete, first review the structure in the GUI Guider Project JSON area. If the node type, hierarchy, or disabled status does not match expectations, return to the design tree, adjust the mapping, and run Convert again. Once the result is confirmed, click Download to export the zip package. The exported package includes the converted project files and related image resources. Extract the zip file, open GUI Guider, select Import Project on the home page, and choose the .guiguider file from the extracted folder to complete the import. If the design uses custom fonts, copy the font files to the resources/font folder in the project directory. After import, developers can continue editing the interface in GUI Guider and validate the project using the JS simulator, the C simulator, or the target platform.   7. Use Cases and Best Practices This plugin is especially useful for teams that already have Figma designs and want to quickly create a GUI Guider project starting point. It can support projects with clear page structures, frequent design iterations, or a need to reduce repetitive communication between design handoff and embedded GUI development. Keep the design structure close to the widget hierarchy: The closer the Figma layer structure is to the parent-child relationship of LVGL widgets, the easier the converted result is to understand and maintain. Treat the converted result as an engineering starting point: The plugin helps reduce initial setup work, but resources, fonts, rendering capabilities, and runtime behavior still need to be validated on the embedded platform. Keep the import environment clean if import fails: If the project cannot be imported successfully into GUI Guider, remove the previously imported design project and retry from a clean state. 8. Summary: Bringing Design into the Engineering Workflow Faster The Figma to GUI Guider plugin provides a more direct connection between Figma designs and GUI Guider projects. Through design tree parsing, LVGL type mapping, node-level conversion control, JSON preview, and project package export, developers can bring existing design assets into the GUI Guider workflow faster, then continue with engineering edits, simulation, and target-platform validation. For teams that already use Figma for interface design, this plugin helps reduce repetitive interface-building work and enables smoother collaboration between design handoff and embedded GUI development. Search for Figma to GUI Guider in Figma Community to try the plugin, then use GUI Guider to continue editing, simulation, and target-platform validation. We welcome your questions, suggestions, and practical feedback as we continue improving the workflow from design to embedded GUI implementation.  
記事全体を表示