Codegen converts the workspace design into C source code that runs on the target device. This guide covers code generation features, configuration options, and integration points.
Overview
After designing screens in the editor, anyui-LIVE generates the screen implementations and converts assets into the generated/ directory of the workspace. The generated code is self-contained and independent of the hardware and development tools used to build the final firmware.
The pipeline is described here; the assets it consumes are defined in the image guide and the font guide.
Generated output
Codegen produces the following in {root}/generated:
| Output | Description |
|---|---|
| Screen source files | C files implementing each screen and the setupUI() entry point. |
| Asset sources | Converted images, fonts, and Lottie data. |
| Header files | Declarations for screens, components, and generated variables. |
This output is automatically generated and should not be modified by hand.
Configuration options
Codegen behavior is controlled through project configuration:
| Option | Description |
|---|---|
| Resolution | Target resolution used when generating screen layout. |
| Color depth | Color depth used for generated assets. |
See the workspace guide for where these options are configured.
Integration points
The generated code integrates with the rest of the system through well-defined entry points:
setupUI()- call this to initialize the UI from your application.generated/- copy these files into your project build.
These integration points are the basis of the transplant guide, which explains moving generated code to a target device.