Jacob Beningo explores the shift from using AI as a coding assistant to agentic firmware development, where AI agents autonomously build, debug, test, and verify embedded systems. He shares a real experiment using an NXP MCX N947 board and an AI-written I2C driver. He also covers hardware safety guardrails, simulation, and how embedded engineers can evolve into systems engineers. Key Takeaways: • Most teams use AI only as a coding assistant. The bigger gains come from agentic workflows where AI builds, debugs, tests, and verifies firmware. • AI doesn't get firmware right on the first try, and neither do human engineers. It needs the ability to iterate, as with test-driven development. • Connecting an AI agent to real hardware or a simulator lets it observe results, find root causes, and fix problems instead of guessing. • In the I2C experiment, the agent correctly diagnosed a hardware problem (a backwards click board) that the engineer had wrongly blamed on the software. • Once the board was fixed, the agent produced a tested, production-grade temperature and humidity sensor driver within about an hour. • A robust agentic workbench combines skills, agents, RAG, and MCP servers, with an orchestration agent following your own development processes. • Give agents access to debuggers, oscilloscopes, logic analyzers, and adjustable power supplies. This brings real risk, including fire hazards, hardware damage, and liability. • Build safety into MCP servers. For example, require users to set voltage and current limits up front, and prompt for approval whenever the agent tries to exceed them. • Simulation offers a safe, continuous way to validate AI-generated code, especially when hardware is dangerous to leave unattended. • Start small. Pick a repetitive daily task with a clear outcome, automate it, then expand the workflow gradually while keeping human verification and static analysis in place.
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Jacob BeningoIn today's episode, we are going to talk about the next frontier of embedded AI. Moving from coding assistance to agentic firmware engineering. That's right, where you are going to be allowing AI to actually perform autonomous engineering. Now, that's a pretty big leap, especially for a lot of you that are probably listening to today's podcast. Because when I talk with a lot of engineers and a lot of teams out in the industry today, out of the embedded systems, industry, what I'm finding is that everybody's saying that they're using AI. You know, they might be using Copilot, they might be using Claude, they may be using, you know, whatever the latest and greatest tool is, right?
Jacob BeningoBut what the problem is, is that they aren't using those tools in an agentic manner that allows them to autonomously build their systems. Instead, what I'm finding is that they are using AI as coding assistance, which is great. You know, it's great when you're writing code, if, you know, AI can suggest a couple of lines of code for you to put in there. Or if you can, you know, if you have a problem, you can go over to AI and say, hey, can you help me fix this device tree? Or can you help me solve this strange issue that I'm having? That's great. You know, an assistant isn't something to be frowned upon.
Jacob BeningoYou know, I use AI on occasion as an assistant as well. But the truth of the matter is that the real power of leveraging AI to build an embedded system is to allow it to work in an agentic manner. Not where it's just generating code for you. For a small part of your system, but where it's actually building, debugging, testing, and verifying the firmware for you. That's right. I'm talking about moving beyond just letting AI code for you. I'm talking about you as a developer moving out of the role of firmware engineer and into the role of an embedded systems engineer, where you're not just focusing on a small piece of the system, but moving out into the larger realm of systems engineering.
Jacob BeningoAnd what When we do that, what you're going to find is that there's a lot of not just cool things that you can do, but there are pieces of the development cycle that need to be automated. When you're using AI as a coding assistant, you're really just limiting what you can do with AI. It's really when you put together a good model, and you start to use it over and over to work on similar types of activities on a daily basis and build out your workflow, that AI is really going to become a game changer for you and for your team.
Jacob BeningoNow, over the last several months, I've been working on all kinds of ways of working with AI and applying them to developing embedded systems. And oftentimes, you know, when I do talk to people, they'll tell me, oh, well, AI doesn't know enough about the hardware to be useful. Or they'll tell me things like AI can't get it right on the first try. Or it doesn't understand, it hasn't been trained on firmware, so it doesn't really know what it's doing. And what I'm here to tell you is that that's not the experience that I've had. Okay, what I have found is that when you connect an AI agent to a good workflow, you can not just get some code written, you can actually have it iterate through, write good code, develop the tests for it, move through an entire validation process that starts with requirements and ends with code that's actually production ready.
Jacob BeningoNow, I know that, again, for many of you who are just using AI as a coding assistant, this sounds like one of those pie in the sky type of ideas, right? And I'm not advocating that you get a list of requirements, push a magic button, and the other side, out comes a widget, okay? That's not the type of agentic firmware development we're talking about here. What we're talking about is developing a robust workflow that allows you to provide AI with work that it needs to do, that maybe goes into a work queue, that is something that you do periodically over and over again, that allows it to actually go out and do the work for you, maybe while you're at lunch.
Jacob BeningoOr maybe when you leave your desk and you go home for the evening to come home and discover that some research activity you needed done is completed, or that some module that you were maybe struggling with or just had to get done and that you were under the gun for is suddenly in a state where you can actually use it and deliver it, okay? So this is the type of agentic firmware that we are talking about here. Now, as I mentioned, I've been doing lots of experiments in this area, and I have found that when you connect agents to the physical hardware, that is a game changer for a lot of teams.
Jacob BeningoI've seen people, like I said, go out and say, well, AI doesn't understand firmware, it can't get things right on the first try, and therefore we shouldn't use it. We just use it as a simple coding assistant. And the fact of the matter is, even when, you know, I write code or the smartest colleagues that I know who are just fantastic firmware engineers, they don't get it right all the time either. That's why we use techniques like test-driven development and all kinds of other modern techniques that allow us to help ensure that we're writing robust code. But the fact of the matter is, is that AI is not going to get right on the first try either, but you need to give it the ability to iterate.
Jacob BeningoAnd so, when we say that AI isn't good at writing code, or it doesn't understand firmware, it's because it doesn't have physical access to the hardware that we're working on. Now, there's two different ways that we can fix that problem. The first is that we can actually give AI access to our hardware. And as I mentioned, I've been doing a lot of experiments with that. I'll share some of that with you here shortly. But the second method is that we can also give AI access to a simulator that can run the code and see whether it actually runs properly in the simulator. Now, for firmware engineers, the simulation method is going to be less interesting versus the hardware side, because we like to work with hardware.
Jacob BeningoBut the fact of the matter is, is that the simulation side can be extraordinarily useful when you need to step out of the office, step away from your desk, and you have devices that you're working with that are perhaps, let's say, dangerous to leave unattended. Okay? Now, as I mentioned, I've been doing lots of experiments. There was an experiment that I did over the course of the summer, where I wanted to test and see if I connect a hardware board to an AI agent, would it be able to iterate through and produce some code and debug problems and basically, you know, go from beginning to end on developing a driver.
Jacob BeningoNow, the idea here, I was using a board that I've been using for a lot of my blogs recently, an NXP MCX N947 board. It's a Cortex M33 part, you know, kind of your, I won't say standard, it's actually a really cool part, but, you know, kind of your tradition, a good microcontroller. Now, what I wanted to do was add a click board to the development board that had a humidity and temperature sensor. And I wanted to see, could I get AI to write a robust I2C driver and write a driver to communicate with the sensor and get the temperature and humidity data from it.
Jacob BeningoAnd again, I've put together a whole bunch of skills, some packages that would allow it to write the code the way that I do. It had my development processes in place so that I could run a nice gambit based on the requirements that I gave it. Now, the interesting thing about this was that I set it off on the task using the models and the process that I use with AI to have it write those drivers for me. And it chugged along for a little bit and I went to check in with it and lo and behold, it tells me, I can't get the temperature sensor and the humidity sensor to work.
Jacob BeningoThere's a problem with your hardware. Now, you know, as a firmware engineer, of course, and always, you know, thinking when we have a software problem that it's the underlying hardware. I know by experience, it's not the hardware. Okay. There's obviously a problem with the software. The AI doesn't know what it's talking about. And so I go and I kind of look at what it's doing and I say, well, did you check this? Did you do this? Blah, blah, blah, blah, blah. Kind of, again, using it almost as a coding assistant at this aspect and it ran its agentic workflow and said, hey, there's a hardware problem.
Jacob BeningoAnd I go through a couple of paces, you know, and about 10 minutes in, I'm realizing, well, this is interesting. The things that I would check from a firmware perspective, this makes it look like the firmware actually looks correct. And we all know that AI can hallucinate, right? So maybe it just looks plausible. But more and more as I dug into it, I started to get this suspicion of maybe there actually is a hardware problem here. And so I actually hadn't played with click boards very often. This is the first one I had been using with a development board.
Jacob BeningoUsually I cobble things together in a different manner. And I was like, hmm, interesting. Let me dive into here and see what's going on. And lo and behold, it turned out I had put the click board in backwards. There was a green LED that was supposed to turn on and user error. I put it in backwards. But AI had tried a whole bunch of processes that had gone through my debugging workflow and came to the conclusion that the hardware was wrong. And in fact, it was. It was installed backwards. So after I went through and I made that adjustment and just flipped the board around, thankfully, those click boards are designed in such a way that my hardware didn't get damaged.
Jacob BeningoSo everything was up and running. The agentic work process continued and within, I'll say, within an hour of me flipping that around, I had a production grade I2C driver, a driver for my temperature humidity sensor. And it had a test application that was able to run the I2C bus, the sensor, the code, and pull data right off that sensor, log it, and do all kinds of cool stuff with it.
Jacob BeningoYou know, all the tests were passing, they were validated, it followed a process where it had gone through and designed a list of tests. It developed the code in a test-driven methodology. And so as you looked at it, you looked at the process, it's like, this is really cool. All right, now, what made that possible wasn't just, you know, saying, hey, AI, go write me some code and fiddling with it. There's a whole model of processes behind the scenes that use skills, agents, RAG, MCP servers that allowed me to connect my orchestration agent, essentially, the agent that was running my firmware, my agentic firmware process, or my, like I like to call it, my agentic firmware workbench.
Jacob BeningoAnd so it ran it, following those processes, and was able to come up with what I consider to be production-grade code for that particular system, okay? And so the interesting thing here, I think the key takeaway, is that AI can become a lot more useful when you actually give it the ability to observe the work that it is doing in an embedded system, okay? So when we connect a debugger, if we connect oscilloscope probes, logic analyzer probes, connect it to a power supply that can be adjusted, all of that type of stuff starts to give visibility to the agent that allows it to not just blindly guess at the code that it's writing, it allows it to write code, test it, see where it made a mistake or see what's not working, and then analyze that, figure out what the root cause is, and identify a fix for that problem, just like any good engineer would do.
Jacob BeningoIt then applies that, and the process repeats over and over until you get to the in-solution of what you're looking for. Now, I don't want to just kind of tell you that AI is taking over our jobs or anything like that. I look at this type of agentic firmware development to be a way to accelerate the way that we develop and build systems. If you have an agent that can go through and help follow proper methodologies, follow your coding styles, follow best practices in the industry, no matter what language you're using, et cetera, et cetera, maybe even trace requirements and help you with system testing and validation, those are things that, in general, firmware teams just don't have the time to do.
Jacob BeningoI can't tell you, and it might be biased because I am a consultant, but I can't tell you how many teams and companies and developers I talk to who say there just isn't enough time between today and when they need to deliver their products. I talk to teams who say they're six months behind on the day that they start, and I see engineers just furiously working away trying to get things done. And what ends up happening? That's a recipe for disaster, for code to be wrong, for things to be overlooked, for security vulnerabilities to fall into the code. And it's not that people aren't working hard or aren't brilliant engineers.
Jacob BeningoThere's just not enough resources and time to go around to meet the demands of society and getting a product to market. And this is, I think, where agentic AI can really actually assist embedded developers and embedded teams. Now, there are certainly challenges to be solved here. I'm not just going to say that you can completely push a button and your firmware is done and comes out the other side after a day or two. I'm not even a proponent for saying that AI should replace an engineer because I believe that there's a lot of value that a human engineer provides.
Jacob BeningoIn fact, I'm even worried about what might happen to our junior engineers if they're just given AI or maybe not even hired because senior engineers do become more productive. We probably, as an engineering industry, need to have a plan in place that helps us to educate younger engineers and get them the skills and experience that they need so that when they are leveraging AI, they can determine whether it's actually hallucinating or whether it's actually producing reasonable results that we would expect from a good, robust workflow. Now, just like anybody, an agent can produce an incorrect solution and they can do it just as confidently as any human being.
Jacob BeningoBut we want to kind of think through some of the additional problems here that an agentic firmware AI agent might have on the development cycle. I mentioned that I gave my agents access to oscilloscopes, power supplies, frequency generators, and all kinds of other hardware that allows them to actually control development boards, hardware I've designed, things like that. Well, you have to be careful in that type of development environment because there could be potential fire hazards.
Jacob BeningoThere could be issues with hardware going faulty. And if you don't have somebody there that actually, you know, do something if something goes wrong, there's a lot of liability that is associated potentially with that. And so giving agents access to hardware, it certainly does introduce new risks and liabilities that we shouldn't just, you know, push off to the side. So this is where I actually think simulation has a very interesting role to play in agentic firmware development. Because we can work with hardware and certainly hardware is going to have its limitations and that I can only produce certain types of faults.
Jacob BeningoI can only sometimes instrument a system so far. And simulation becomes an interesting direction to take your development cycle and your workflows so that in a continuous integrated environment, you can validate your software that AI is producing. Or so that even AI can use that simulated environment to test out new application code. And I don't think all the problems there have been fully solved yet. But I think these are pieces of the development workflow that are currently missing from a lot of teams' workflows that if they were more familiar with some of these techniques, it would help them use artificial intelligence in a much more efficient manner so that they could get more done.
Jacob BeningoOkay. Other things that I find are potentially an issue from some of my experiments is boundary conditions. You know, some of the tests that I've done is I've taken some of my development boards and some of my systems and I said, well, let's run this through complete system level tests and let AI drive the test harness and analyze the results as it's going through. And certainly you can do power testing where you, you know, take the system down to a brownout or maybe even do some overvoltage testing to see how the system behaves.
Jacob BeningoIn those types of circumstances, some of those extremes can potentially cause problems with your hardware. And so, you know, maybe you have a system that doesn't have great regulation. And if the agent decides to send 28 volts to something that's supposed to only get a maximum of, let's say, five or six volts, something could get damaged. And so what I have found is that as part of the development of an agentic firmware workbench, your MCP servers, your AGES, they need to have built-in protections that catch them if they try to go above and beyond, you know, a voltage limit or outside the bounds of what can be considered safe.
Jacob BeningoAnd you might think initially that, okay, well, that's something that's a little bit challenging to actually have these systems do. But I found very easily that this isn't actually as hard or challenging as it sounds. If you actually check out my public GitHub account, there are a couple of pieces of software that I have put up there just for people to go and grab that actually demonstrates some of these capabilities of how you can throw a safety, some safety into some of these MCP servers. So what you'll actually find is that I have a power supply unit and a PSU project where an agent can actually go and control a power supply and it can set the voltages and the current limits, all that kind of stuff.
Jacob BeningoBut when the MCP server is invoked for the first time, what happens is it does actually prompt the user and force the user to say what the maximum limit that's allowed and what the current limits are going to be before it even starts. The scripts in the background, whenever the agent tries to go outside those limits, it will actually ping the user and force the user to accept the request or allow them to deny the change of those voltages and those currents. Okay. And so by doing that, we are adding some level of, you know, failure prevention that the agents can't go outside those bounds and those boundaries.
Jacob BeningoAnd I know we've all heard the stories of, you know, agents going outside of and finding ways to kind of circumvent the boxes that they are put in. But I think those are extreme cases. They're not the types of cases that I see when you're building simple agents that are specialized and focused on doing a specific task. And I think it's more when you look at the computer science industry and they're doing just random experiments to see how autonomous these things can actually be. Okay. So I don't think there's a huge concern there for us as embedded systems developers, but still something that we should keep in mind because verification, failure recovery, all of these things are actually really essential when you're allowing an agent to work through your software development workflow.
Jacob BeningoAnd there is a level of human oversight that is required there. And when I first started working with artificial intelligence years ago, I always used to train people and tell them that it's important for humans to be in a loop. And I still believe that, but more and more, I have found that the tools are there for you to allow agentic development where you can automate things that you're doing on a daily basis, build in your skill sets, and you can still verify what it's doing. But what led me to kind of this conclusion was that humans become the slow point in the loop.
Jacob BeningoIf you just work with an AI coding agent that's going to, you know, work with you as an assistant, the human is the thing that's slowing everything down. When you allow an agentic process to be followed, the agent can iterate far faster without a human, and then we just need to verify the box at the end of the day, okay? And certainly make sure that it followed our coding standards and stuff like that, but that can be done a lot faster with static analysis tools. And what this does is it frees up us as embedded systems developers, as managers, et cetera, et cetera, to be able to focus on what we should be doing the most of, which is actually looking at our customers, building new features, innovating, creating new innovative features, maybe coming up with ideas of new products, rather than, you know, trying to figure out how to run an I2C driver for the hundredth time in somebody's career, okay?
Jacob BeningoThat's not value add to a company anymore, okay? 20 years ago, yeah, there was a lot of value in that. Today, yeah, I2C drivers, a lot of the low-level stuff that we kind of cling to as firmware engineers, those are things that need to be abstracted out of the development cycle. We need to move and elevate ourselves to be embedded systems engineers. Now, as I kind of mentioned this, so ultimately the idea, the challenge isn't about getting AI to write more code for us. What I'm trying to get through to you is that it can get reliable results, but those results at a system level of following our entire workflow really requires AI to put hardware and simulation into its development cycle, into the development loop that it's using.
Jacob BeningoAnd for us as humans to kind of step back and allow an agentic workflow to actually run. And I'm not telling you that you should go through and start doing all of this tomorrow from beginning to end. What I'm suggesting is that you start doing this piecemeal. Start to identify what is it that you're doing on a daily basis, you and your team, every single day. Is there a way that you can automate that process using AI? Once you get that working, you look and see, what else are we doing? What ties into this? What are good inputs to this AI process and workflow? What are good outputs from it?
Jacob BeningoWhat should that then feed into? And what you'll find is that over time, you can build up a set of tools, a set of workflows, a set of processes that really help drive AI to make a huge difference in the way that you develop embedded systems. Okay? And like I said, I don't think you should do this all at once. You know, pick a repetitive task, identify a clear outcome, and slowly build up your processes and your workflows for working with AI. I know a lot of you may be listening to this and saying, yeah, but, you know, here's the problems A, B, and C about using agentic workflows, about using AI in that manner.
Jacob BeningoI honestly think probably as you start to experiment with some of these ideas and concepts, you're going to discover that you will slowly over time get more comfortable with them as you learn how to tune AI to work for you. When I started, you know, years ago, I thought it was interesting but junk. But there was a part of me that said, I wonder if I can apply this tool to help improve the way that I develop embedded systems. You know, I've worked the whole gambit. I've done medical devices that are life-saving.
Jacob BeningoI've developed turbine engines that take, you know, aircraft up into the sky. I've developed propulsion systems that have taken spacecraft to the moon. I've worked on equipment for industrial kitchens and in the automotive industry and all kinds of different things. And so it isn't so much a question of can I do the work? It's how, you know, I had this idea of how can I apply AI to take the workflows and take my experiences and try to help accelerate my ability to develop embedded systems. And what I'm trying to tell you today is that it is possible to use AI in this way.
Jacob BeningoAnd I hope that you will stop and think about how you're leveraging AI today and start thinking about how can you apply it to your workflow to make it so that you can develop a system that is more robust so that you can get more done. And so that you can start focusing more on the innovation and the interesting products that and features that your customers want rather than redoing the exact same thing that you've been doing for the last 10 or 15 years over and over and over again. I think now is the time to automate now is the time to invest and investigate how to leverage AI as a tool to improve your embedded systems workflows.
Jacob BeningoSo if you don't know how to do that, feel free to shoot me an email at jacob@beningo.com. I'm happy to point you to some resources or see how I can help you out. If you have had some experiences with that, good or bad, I'm happy to hear from you. Feel free to let me know. And if there's other ideas that you'd like to hear about on the podcast in the future, don't hesitate to let me know. I'm happy to dig into those things and, you know, see where it goes. But ultimately, we're heading towards a direction, I think, in the future where our engineering workflows are going to help guide AI.
Jacob BeningoAnd AI is going to participate in that software development lifecycle, whether we like it or not. It just becomes a question of, is your team going to be the one that adopts those techniques and gets ahead of the competition? Or are you going to be the ones that have to play catch up down the road where your company is essentially eaten by your competitors because you've fallen behind? All right. With that in mind, I hope this gives you some interesting ideas and thoughts to take into your week. And I look forward to hearing from you in the future and talking with you soon. Happy coding.
Jacob BeningoAnd don't forget to play around with those AI workflows and techniques and ideas. Check out my GitHub. And if you're not on my Embedded Bytes newsletter, I would highly encourage you to go to Beningo.com. Sign up for the newsletter. I'm talking about these type of AI ideas in addition to talking about things like Zephyr, real-time operating systems, and all those little things that we have to do when we're developing a real-time embedded system. So until next time, happy coding.
Jacob Beningo talks with RTOS pioneer Bill Lamie, creator of Nucleus, ThreadX, and PX5 RTOS, about how to write efficient, high-performance real-time code. They cover POSIX pthreads, keeping software simple, RTOS...
Jacob Beningo explains why agentic firmware development is already here and how embedded teams can move beyond ad hoc AI prompting. He covers skills, agents, RAG databases, and MCP servers, shows how NXP's new agentic...
Jacob Beningo concludes his embedded software modernization framework series by discussing the establishment of metrics scoreboards for embedded systems development. He explores various metrics categories including code...
Jacob Beningo explores how artificial intelligence and machine learning can modernize embedded systems development, sharing practical examples and dispelling myths about AI's applicability to embedded development. He...
In this episode, Jacob explores simulation for embedded systems as the seventh step in modernizing embedded development. He discusses functional simulation, on-chip simulation, and software architecture simulation,...