EmbeddedRelated.com
Blogs
Imagine Conference

3 Tips for Developing Embedded Systems with AI

Jacob BeningoMarch 1, 2025

AI is not a replacement for developers but an interesting augmentation tool.

Now, you might think that AI doesn’t have a place in embedded systems. Embedded devices are too resource-constrained, and AI models aren’t trained for embedded.

If you look past what we’re building to how we’re building them, you’ll discover countless ways to leverage AI to save development time and costs.

This article is available in PDF format for easy printing

Over the last several months, I’ve embarked on a journey to figure out when and where AI makes sense for developing embedded software.

I’ll present what I’ve learned and the techniques I’ve adopted so far at the Embedded Online Conference in a workshop entitled Embedded AI: Leveraging AI Agents for Smarter Development.

In this post, you’ll learn a few simple tips I’ve learned along the way that can help you prepare for using AI to develop embedded systems.

Tip #1 – Document Your Workflow Before Adding AI

As embedded engineers, you have certain workflows that you follow to develop your systems. For example, you have a workflow that helps you:

  • Solicit requirements
  • Develop device drivers
  • Create unit tests
  • Build your software
  • Debug issues

and much more.

A lot of these workflows are natural to you. You don’t sit down and go through a checklist every time you need to develop a new feature. You sit down and, from experience, write the code to implement that feature.

The challenge with leveraging AI effectively is that AI doesn’t have the experience you have! If you use it, you must treat it like an intern or junior engineer!

That means you need to explicitly lay out what you want done and how you want it done step by step.

There are several things you need to do to ensure that you are ready to work AI:

  1. Identify the workflow that you want help with
  2. Document the workflow steps. This includes the inputs, what’s done, and the outputs.
  3. Fix the workflow. There are likely holes and adjustments you make on the fly that an intern or an AI won’t come up with.

Once you’ve documented your workflow and created any fixes necessary for clarity, then you’ll be ready to bring AI into the picture.

An Example Embedded Training Analysis Agent

Once you have a documented workflow, you’re ready to prepare an AI Agent to help you. You can try within one, but as I’ve found, it’s more likely to wreak havoc and run into the weeds, wasting money and time.

(I lost a week’s worth of AI credits early on because I was too vague, and one of my agents went off the rails).

Let’s look at an example. Imagine that you manage your team’s continuing education development. Instead of just dropping a bunch of data into ChatGPT and asking it to tell you how people should be trained, you could instead document the steps you would take.

These steps might be:

  1. Collect employee data like performance metrics, skill assessments, etc
  2. Review the data and analyze it for skill gaps
  3. Identify what training can fill the gaps
  4. Find potential training courses to cover the gaps
  5. Produce a report that provides recommendations

The workflow doesn’t have to be overly complicated, but it does provide the steps necessary that anyone, including an AI, can follow.

Taking this workflow, I might create an agent using the following:

You assist in analyzing employee performance data and identifying 
training needs.

You will be provided with employee data including performance metrics, 
skills assessment results, and feedback information.

Please follow these guidelines to perform this task:
1. Use the Analyze Training Needs tool to process the employee data and 
identify skill gaps, performance issues, and areas requiring improvement.

2. Use Knowledge Search to find relevant existing training programs and 
resources that match the identified needs.

3. Use Generate Training Recommendations to create specific, actionable 
training recommendations based on:
- Identified skill gaps
- Available training resources
- Employee's current role and career path
- Performance improvement requirements

4. Use Send Email via Gmail to send a detailed report containing:
- Summary of identified training needs
- Specific skill gaps identified
- Recommended training programs
- Priority levels for each recommendation
- Available resources from the company's knowledge base

5. Terminate task.

Note: Ensure all recommendations are specific, actionable, and 
aligned with both employee development needs and organizational goals.

As you can see, the workflow to identify skill gaps once documented naturally flows into the language we use to instruct an AI Agent on performing a job function.

Creating the agent is more complicated, but the key takeaway is that you need to document your workflows if you hope to adopt AI effectively.  

Embedded AI: Leveraging AI Agents for Smarter Development

Tip #2 – Use AI to Supercharge Testing and Debugging

On average, developers spend 20 – 40% of their time debugging their code. If you do the math, that’s 2.5 – 5 work months per year.

I’ve always considered that time to be failure work. If we had considered the complexities more carefully, we might have avoided that wasted time.

(Don’t get me wrong, debugging will always exist, and some issues pop up that no one could foresee).

Finding bugs and optimizing performance is where AI really shines. Instead of sifting through debug logs or writing endless test cases yourself, why not leverage AI to enhance and automate the process?

One of the applications in embedded development that I applied AI to was debugging and optimization.

I encountered an issue where CPU load was pegging at 100% and deadlines were being missed. I had jumped into the code as a third party and didn’t know the code base well. While I have my typical tricks, I decided to test AI to create a process to find the issue.

From that process, I was able to quickly identify a simple function with maybe twenty lines of code that was using a lot of CPU to do something really simple.

Upon examination, I noticed that the code was poorly written. It was written for speed. It looked like the developer was new to embedded and had written it like they were writing code or a mobile application or cloud app.

Since the code was common and had no secret sauce, we let AI optimize it. After about five seconds, we had a new, highly optimized function that dropped the CPU load from 100% to 65%. Not too shabby.

AI Uses for Testing and Debugging

The example I just gave you shows how developers can leverage AI to debug and optimize. You might be wondering about other potential applications.

Here are several additional examples how you can leverage AI to help accelerate your embedded software development work:

Automated Test Generation

I love using Test-driven Development to write embedded software. However, coming up with lists of tests, writing the tests, etc can get a bit cumbersome after a while. I’ve found that using an AI Agent to act as a pair-programming can help speed up this process.

The AI Agent tends to find scenarios you might overlook, and by letting AI write the tests with your review, the work goes much faster and is much more accurate.

Anomaly Detection

An important concept in software engineering today, particularly with DevOps is Observability. Observability is the ability to comprehensively monitor, understand, and diagnose the internal state of an embedded system.

You can retrieve log data about your fleet of deployed systems and use AI Agents to sift through and make sense of the data. You can get questions answered like:
  • Are all the systems behaving as expected?
  • Are any devices behaving in unexpected ways?
  • Which devices are consistently reporting error events?
  • How does the latency of critical operations compare across devices?
  • Are resource usage patterns (like CPU, memory, and network activity) within expected ranges?

Smart Debugging Assistance

Imagine being able to ask a virtual “senior engineer” to look at your code, logs, or crash reports and offer suggestions on where things might be going wrong. That’s essentially what AI-powered debugging tools can do. They sift through mountains of data—like stack traces, error logs, and even code repositories—to pinpoint likely culprits behind a bug or performance issue.

  • Root Cause Analysis – AI can highlight suspicious sections of code or configuration files based on patterns from past issues.
  • Suggested Fixes – Some tools go further, offering potential solutions or code snippets to patch the issue.
  • Proactive Warnings – If the AI detects a pattern in your code that historically leads to bugs, it can warn you before a problem actually surfaces.

By leveraging AI for testing and debugging, you not only speed up your development cycle but also gain a deeper understanding of system behavior. This approach transforms troubleshooting from a reactive chore into a proactive strategy that keeps your embedded systems running smoothly.

Imagine, if you can cut that 40% debug time in half! What will you do with an extra month or two of development each year? (I’d recommend taking an extra week of vacation!).

Tip #3 – Adopt AI-Assisted Code Generation and Optimization

In many ways, AI-assisted code generation can feel like having an extra pair of hands in your development process. Rather than writing every line of code yourself, you can let an AI Agent propose functions, modules, or even entire classes that you can then review and refine.

This does not mean you can blindly accept whatever the AI produces, it just means you can accelerate your work by focusing on design decisions and validation instead of starting every file from scratch.

I started experimenting with AI-generated code after seeing how much time it saved me during debugging. If an AI can locate performance bottlenecks, why not let it help create more efficient code in the first place?

I decided to have an AI propose a hardware abstraction layer for a microcontroller-based project I was working on. The AI generated a good starting point, which I modified to better fit my architecture and naming conventions. It was not perfect, but it gave me a strong foundation that I could refine.

With each interface we designed, I was able to then teach the agent my preferences and why I wanted things the way I did.

The result as a tool that writes interfaces how I do, but much faster!

What else can you do?

Here are a few examples of where you might consider using AI-assisted code generation and optimization:

Driver Development

You can provide hardware specifications or an API reference to an AI Agent, then let it generate low-level driver code. This can be especially useful if you are pressed for time or if the interface is straightforward.

Algorithm Prototyping

If you need a complex data structure or an algorithm to handle specific constraints, you can have the AI propose a solution. You still need to validate it for edge cases and embedded constraints, but it can give you a jump start.

Performance Tuning

When you have a function or loop that needs to be optimized, you can let the AI suggest refactors or more efficient approaches. You can then benchmark and compare results to see if it meets your real-time requirements.

You always need to review and test AI-generated code, especially in embedded systems where resource constraints are tight and mistakes can be costly. However, if you combine a documented workflow, robust testing, and a clear understanding of your system requirements, AI-assisted code generation can significantly reduce development time.

The real trick is to keep a careful eye on what the AI produces, verify its output, and shape it into something that meets the reliability and performance needs of your application.

The Bottom Line

AI isn’t going to develop your embedded system for you. The techniques I’ve been exploring can dramatically impact how embedded systems are developed. I don’t think it’s a matter of if you will use AI to build embedded systems; it’s when you will use it!

This blog has several tips on leveraging AI for embedded systems. These are just the tip of the iceberg!

If you won’t be using AI tomorrow, it’s still a good idea to prepare for it. You can start by documenting and improving your workflows. You may find that just doing that allows you to automate processes without AI.

Some will be perfect candidates for AI, though. When you identify those, then you’ll be ready to dig into AI Agents and see how they can revolutionize how you write and build embedded systems.

I invite you to explore the AI tools and techniques mentioned here, and if you’re curious to dive even deeper, consider joining my workshop at the Embedded Online Conference, where we’ll explore hands-on how AI Agents can revolutionize embedded software development.

About Jacob Beningo

Too many teams struggle with outdated software architectures, inefficient processes, and evolving development skills, making delivering quality systems on time difficult. Jacob helps teams modernize their software architecture and development processes while adopting best practices for real-time embedded systems.

As a consultant and trainer, he provides strategic guidance and hands-on training through Beningo Embedded Group and his Embedded Software Academy, equipping engineers with the skills they need to streamline development, stay competitive, and confidently build high-quality products.

Learn more at www.beningo.com.


Imagine Conference

To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.

Please login (on the right) if you already have an account on this platform.

Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: