Ubiquitous Computing Technology Corporation

UCT — RTOS Column

Case Study: An Engineer with Six Months of RTOS Experience Builds a Dual-Core Control System with AI in Under Two Weeks — Opportunities and Challenges for Embedded Systems and Generative AI

A dual-core robot arm control system built with μT-Kernel 3.0 in nine days: the opportunities of AI-assisted embedded development and the challenges of design and debugging.

A Project Expected to Take a Month Was Completed in Nine Days

Running an RTOS on both cores of a dual-core MCU and coordinating them to control a robot arm over a network.

Anyone with embedded software development experience will recognize that this is far from a straightforward program. Even a basic working demo requires porting the RTOS and protocol stack, defining an inter-core communication protocol and debugging it. Without prior experience, this scale of development would typically take more than a month.

For this experiment, we deliberately assigned the project to a young engineer with just six months of RTOS experience. We also introduced one experimental rule: unrestricted use of AI for coding.

The result? In just nine days, the program was ready for an exhibition demo.

This firsthand account of multicore development with the μT-Kernel 3.0 RTOS shares a practical view of the remarkable speed generative AI can bring to embedded development—and the challenges specific to embedded systems that it exposes.

The development described in this article took place in May 2026. Generative AI is advancing rapidly, so the situation continues to change.

Development Target: Dual-Core Robot Arm Control with μT-Kernel 3.0

We built a demo system combining an STM32H747I-EVAL board with a six-axis robot arm.
The robot arm is controlled from a web browser on a PC.

Demo system combining an STM32H747I-EVAL board and a six-axis robot arm

The responsibilities of each CPU core and the way they work together are as follows.

  • Cortex-M7 (Core 0: High-Level Control)
    • μT-Kernel 3.0 RTOS + lwIP (TCP/IP protocol stack)
    • Acts as a web server that receives control requests from a PC browser through a REST API
  • Cortex-M4 (Core 1: Actuation)
    • μT-Kernel 3.0 RTOS
    • Precisely drives the six-axis servos by controlling a PCA9685 PWM driver over I2C
  • Inter-Core Coordination
    • Shared memory, hardware semaphores and interrupt notifications

When a PC sends a command over the network, Core 0 receives it and passes it to Core 1 through inter-core communication. Core 1 then moves the robot arm as instructed.

Robot arm control architecture with coordination between Cortex-M7 and Cortex-M4

Why Did It Take Only Nine Days? A Development Timeline Built Around AI

Generative AI was used extensively throughout the project. During the design phase, we applied our expertise in porting μT-Kernel 3.0 and lwIP. All coding was performed by AI.
The development effort broke down as follows.

DaysWork
4 daysPorting μT-Kernel 3.0 and lwIP
3 daysImplementing shared-memory control and interrupt-based inter-core communication
2 daysImplementing application functions, including robot arm control logic and web API integration

Because the project finished well ahead of the original estimate, we used the remaining time to add an LCD slideshow and an automatic demo mode that plays back predefined motion sequences.

Compared with writing drivers manually while consulting RTOS API references, AI offers a remarkable increase in the speed of initial implementation.

Pitfalls of AI-Assisted Embedded Development Revealed by Code Review

Can AI enable an inexperienced engineer to produce flawless embedded software? The answer is partly yes and partly no.

Although the demo worked, reviewing the completed source code revealed several problems that could not be overlooked in an embedded system.

1. Inter-Task Control That Ignores RTOS Fundamentals

We found basic antipatterns such as managing flags through global variables in situations that called for RTOS synchronization and communication mechanisms—event flags, semaphores or mailboxes—to provide mutual exclusion and synchronization between tasks. Code like this may appear to work when the timing happens to be favorable, but it can produce race conditions under heavy load or unexpected interrupts.

2. Excessive Debugging Routines Left in the Code

Unnecessary logging and state-checking code remained throughout the implementation. These traces suggested that AI had added excessive diagnostic code through trial and error as it tried to infer runtime behavior under the RTOS, including task preemption and dispatching.

Why Did These Problems Arise? Three Challenges Specific to Embedded Development

Rather than simply reflecting flaws in AI tools, these problems stem from the particular constraints of embedded development and the difficulty of giving effective prompts.

  1. AI Was Not Given the Right Context
    A request as simple as “I want these two tasks to exchange data” may lead AI to propose a short route, such as global variables, that is common in web or general-purpose applications. Developers need the skills to provide prompts grounded in RTOS design principles—for example, “Use μT-Kernel 3.0 event flags for task synchronization and mutexes for mutual exclusion.”

  2. Limited Training Data for Embedded Systems
    Compared with common web frameworks or Python, far less high-quality code for RTOSs and MCU-specific peripheral control is publicly available online. As a result, AI may not always select embedded best practices on its own.

  3. The Physical Barrier: AI Cannot Directly Debug the Hardware
    In web development, it is relatively easy to let AI run tests, read error logs and repeat a debugging loop. Embedded development involves physical hardware problems: no waveform at a device pin, no I2C acknowledgment, or a core stopping while holding shared memory. These situations still require human intervention and an on-target debugger.

Why Fundamentals and Debugging Tools Matter in the AI Era

The main lesson from this experiment is that AI can be an extremely fast coder, but steering the design and assuring quality still depend on an engineer’s understanding of RTOSs and debugging skills.

Engineers who can give AI effective instructions, identify risks in generated code and use real hardware to expose and isolate multicore timing bugs can reduce development time to a fraction of what it was previously.

UCT’s Approach

We are actively working on the use of AI in embedded systems.

  • Sound architecture design for embedded systems using RTOSs
  • Standardized development processes combining prompt engineering with embedded domain expertise
  • Advanced on-target debugging and verification solutions using multicore and JTAG debuggers

Please contact us if you want to adopt multicore MCUs or an RTOS but need a clearer path for design and debugging, or if you want to accelerate embedded development with the latest AI techniques.

Contact us to discuss RTOS adoption and development.

Contact Us →