Practical Comparison of Chinese AI Coding Models for Firmware Development
This article describes a test of Chinese AI coding models. The author used a coding agent to build a graphical Snake game that runs in a firmware environment without an operating system. The article covers the three development rounds and 27 prompts, then discusses the main problems: overstepping the working directory, shortcuts in environment setup, and inconsistent long-context behavior. It ends with practical advice for using coding agents on low-level development.
1. Background: Testing Coding Models with a Demanding Task
In recent months, several Chinese large model vendors have released new generations of models for programming. Discussion about what AI coding tools can actually do has grown alongside them. Routine code completion and unit test generation no longer separate one model from another well. Long, multi-step tasks with strict constraints and heavy reliance on domain knowledge are where the differences show.
Based on this view, the author designed a demanding test: build a graphical Snake game that runs at the firmware layer, the environment that exists before an operating system boots. This scenario is a useful benchmark for several reasons:
- The runtime has no operating system and no standard library. All graphics output must write directly to the video framebuffer.
- The toolchain is specialized and requires a dedicated firmware development kit and a cross-compilation environment.
- Debugging is limited. When something fails, the developer cannot simply set breakpoints or inspect stack traces as in a normal application.
- Graphics protocols, keyboard input, and timers must each be implemented through the interfaces defined in the firmware specification.
The final requirements were: running in a pure firmware environment, a fully Chinese-language interface, hardware-accelerated rendering based on a graphics output protocol, double buffering to prevent screen tearing, multiple levels with increasing difficulty, an obstacle system, particle effects when food is eaten, two sets of key control schemes, and a pause feature.
2. Development Process: Three Rounds and 27 Prompts
The development used a coding agent driven by conversational prompts. The author wrote no application code by hand. The work took a little over three hours and used 27 prompts across three rounds.
Round 1: Basic version. The project was initialized and a Chinese-language project specification document was created. The author specified the target platform, the graphics protocol, and the constraint of not relying on an operating system. The goal was a minimal version that compiles and runs: a black-and-white Snake game controlled with arrow keys, where eating food adds points.
Round 2: Feature enhancements. A level system, obstacles, double-buffered rendering, and effects were added to the basic version. This round tested the model’s ability to understand existing code and make incremental changes.
Round 3: Chinese localization. Menus, the status bar, and control hints were all switched to Chinese. The request looked simple, but it required embedding font bitmap data, handling character encoding, and reworking the rendering pipeline. It had the most technical detail of the three rounds.
The final build ran as intended, but the process was harder than expected. The sections below cover the typical problems and compare the models’ strengths and weaknesses.
3. Problem One: Overstepping the Working Directory
The first issue appeared during project initialization. The author gave the first instruction in an empty directory, asking the model to initialize the project and create a Chinese-language documentation file. The model began downloading the firmware development kit source and configuring the build environment. Everything looked normal until the directory structure was checked. The model had created the development kit one level above the working directory.
Worse, during later compilation, it created more directories in the parent directory, including tools, build output, and configuration files, leaving the parent directory cluttered.
This was not an isolated case. In an earlier test of another Chinese coding model, the same kind of unilateral behavior appeared. This points to a shared weakness in current coding agents:
- Weak boundary awareness. When planning paths, models tend to organize the project structure “by convention” and ignore the working directory the user explicitly set.
- Overly strong environment assumptions. Many firmware tutorials assume a fixed directory layout. The model treated conventions from its training data as constraints for the current session.
- No self-check for rollback. Even when a path looks wrong, models rarely clean up the files they created.
The engineering takeaway is that, for long-running agent tasks, you should restrict permissions tightly and avoid automatic execution modes that skip confirmation. Adding an explicit instruction to the prompt, such as “All operations must stay within the current directory. Do not create any files in a parent directory,” can substantially reduce the chance of this problem.
4. Problem Two: A Shortcut in Setting Up the Runtime Environment
The second issue involved the simulated runtime. Even though the prompt hinted at a “simulator,” the model took a shortcut: it downloaded a prebuilt virtual machine firmware image and skipped building from source.
This saved compile time but created new problems. The downloaded firmware image lacked command-line boot options, and the boot medium did not contain the compiled application, so the application could not be booted. The model had to go back, rebuild the boot disk, and configure the boot entries, which cost several more rounds.
Comparing the models showed clear differences in strategy:
- Some models prefer to download a ready-made image. This is fast, but compatibility is hard to control.
- Some models prefer to build from source. This is slower at the start, but the environment is fully controllable and reproducible.
- A few models recognized key clues in the prompt, such as “simulator,” and chose a matching approach on their own.
This difference reflects how well a model plans tasks: whether it prioritizes short-term progress or getting the path right. For low-level development, where one wrong step breaks everything after it, correct paths matter far more than speed.
5. Side-by-Side Observations on Several Models
Based on this test and earlier similar tests, the following neutral observations describe how current mainstream Chinese coding models perform in low-level development.
First, code generation quality is generally adequate. All three models produced syntactically correct, reasonably structured low-level code. They used the graphics output protocol, keyboard events, and timer interfaces mostly correctly, which suggests that training data covers firmware development reasonably well.
Second, engineering discipline varies noticeably. The gaps appear mainly in directory management, dependency handling, and environment setup. Some models respected the boundaries the user set. Others often overstepped and needed repeated manual correction.
Third, self-correction after errors is the dividing line. Compile errors, link failures, and black-screen runs almost always occur. Strong models read the error output, identify the root cause, and fix it. Weaker models repeat the same failed fix for the same error and need a person to suggest a different approach.
Fourth, consistency over long contexts still needs work. After more than 20 conversation rounds across three iterations, some models forgot constraints set early on, such as “do not introduce external dependencies.” Later changes then broke earlier work. Keeping a continuously updated project specification document as the single source of truth reduces this problem.
6. Practical Recommendations
Based on these experiences, here are several general recommendations for working with large models on low-level development:
- Set the rules before starting. Define the directory boundary, permission scope, prohibited actions, and target environment in the first prompt. This costs far less than correcting the model after it goes off track.
- Work in small steps and verify each round. Split large tasks into stages, such as a minimal version that compiles, then feature enhancements, then polish. Verify the result at the end of each round to prevent errors from accumulating.
- Have the model write its own documentation. The project specification is for humans, but it also helps the model review the project in later rounds. It substantially improves consistency over long tasks.
- If the environment can be built from source, avoid prebuilt binaries. Prebuilt artifacts seem convenient, but the hidden cost of version mismatches is often higher.
- Keep a human in the loop. Agents suit repetitive, pattern-based work. Debugging environments and making architecture decisions still need a developer’s review.
7. Conclusion
Completing a firmware-level graphical game in just over three hours with 27 prompts shows that Chinese coding models already have the foundational ability to handle real engineering tasks. But “capable” and “reliable” are different things. Directory overreach, shortcuts in environment setup, and forgotten long-context constraints are real issues that anyone using these tools must address today.
For developers, a reasonable approach avoids both overhyping the tools and dismissing them. Treat a coding agent as a capable partner that needs clear constraints. Use clear boundaries, staged verification, and ongoing context management to direct it, so the model’s potential becomes real productivity.
