anyuianyui
anyui
anyui-LIVE
Feedback
  • English
  • 简体中文
anyui
anyui-LIVE
Feedback
  • English
  • 简体中文
  • Introduction

    • Introduction
  • Get Started

    • Get Started
  • Workspace

    • Workspace
  • Editor

    • Overview
    • Toolbar
    • Navigator
    • Inspector
    • Statusbar
    • Settings
    • Canvas
    • Preview
  • Subjects

    • Image
    • Font
    • Layout
    • Dynamic LVGL version
    • Override screen size
    • Codegen
    • Transplant

Transplant moves the generated anyui-LIVE output onto a target device or integrates it into an existing project. This guide covers migration, transplantation, and integration with other systems.

Overview

anyui-LIVE focuses on UI design, and the generated UI code is designed to stay independent of specific hardware and development tools (such as Keil). The generated code can be moved to any target that satisfies the LVGL requirements.

The output being transplanted is described in the codegen guide, and the code it depends on is described in the image guide and the font guide.

Transplant process

UI code

All UI code is generated within the {root}/generated directory, including screen implementations and converted assets (images, fonts, lotties). To transplant:

  1. Copy the generated code into your project.
  2. Invoke setupUI() to initialize the UI.
  3. Compile the project for the target toolchain.

This code is automatically generated and should not be manually modified.

lv_conf.h

Maintain a device-specific copy of lv_conf.h with at least the following configurations:

/** Required configurations */
#define LV_HOR_RES_MAX (?) // Horizontal resolution
#define LV_VER_RES_MAX (?) // Vertical resolution
#define LV_COLOR_DEPTH 16
/* Size of the memory available for lv_mem_alloc() in bytes (>= 2kB) */
#define LV_MEM_SIZE (?) // Memory size in bytes

/** Optional configurations as needed */
#define LV_USE_LOG 1 // Enable log

#define LV_USE_FS_STDIO 1 // Enable file system
#define LV_USE_PNG 1 // Enable PNG decoder
#define LV_USE_JPEG 1 // Enable JPEG decoder
#define LV_USE_BMP 1 // Enable BMP decoder
#define LV_USE_GIF 1 // Enable GIF decoder

#define LV_USE_BTN 1 // Enable button
#define LV_USE_IMG 1 // Enable image
#define LV_USE_LABEL 1 // Enable label
// Additional components as required

/** Device-specific exclusions */
//#define USE_SIMULATOR

Integration with external systems

The generated code can be integrated with an existing embedded project:

  • Application entry - call setupUI() from main() after LVGL is initialized.
  • Communication - handle commands from the UI through your own handlers.

Related guides

  • Font - font assets included in the transplant.
  • Workspace - the generated folder.
  • Overview - the screens that are transplanted.
  • Codegen - the generated output and entry points.
Prev
Codegen