There’s something that kills coding speed—iteration time. If you can smash a function key and run your code, then watch it break, tweak, and smash it again—you’re working fast. But if you have to first compile your code, then plug your hardware in, burn it to the board, and so on… you’re wasting a lot of time. It’s that problem that inspired [Larry] to create an embedded system simulator to speed development time for simple projects.
The simulator is intended for emulating Arduino builds on iPhone and Mac hardware. For example, [Larry] shows off a demo on an old iPhone, which is simulating an ESP32 playing a GIF on a small LCD display. The build isn’t intended for timing-delicate stuff, nor anything involving advanced low-level peripherals or sleep routines and the like. For that, you’re better off with real hardware. But if you’re working on something like a user interface for a small embedded display, or just making minor tweaks to some code… you can understand why the the simulator might be a much faster way to work.
For now, [Larry] has kept the project closed source, as he’s found that it wouldn’t reasonably be possible for him to customize it for everyone’s unique hardware and use cases. Still, it’s a great example of how creating your own tools can ease your life as a developer. We’ve seen [Larry]’s great work around here before, like this speedy JPEG decoder library.
Just a few layers of emulation occurring here….
https://wokwi.com/ is great for this when your device(s) are supported. It is possible to add new devices, but it’s not trivial
Can I use it to run 5 picos and communicate between them? I have a project…
This is not the purpose of my project – nothing like Wokwi. My project allows me to be efficient at software development and write/debug/profile my embedded code on my very fast and comfortable Mac.
I am confused. Why did Larry publish details about this project if he is just being a gatekeeper about the whole thing? It doesn’t benefit him or anyone else.
Replied to the wrong comment, but the point still stands.
I’ll be honest and try to hopefully not sound rude.
I have found hardware emulation to be in either of two camps. One is ultra simplistic, with fisher price toy tier UIs, made for hobbyists, education and beginners in general. Great if you want to see your animated LED blink, but not much else. Anyway, it serves the intended target audience well, so who am I to complain?
The other is the wild west with thousands of dollar worth of proprietary solutions, multi headed dragon fighting with the tooling. But if your hardware is as valuable as the management thinks, this is truly the only way.
There is nothing in between. Something that can let me just figure out if my TWI or SPI bus code actually works before having to flash it on the actual device. Something that can let me hook up a pulseview/saleae recording of logic states to a simulated GPIO. Its great that we have several different emulated architectures but I’m not writing assembly, so its not truly useful for me, at the level that I want.
Your “in between” is called BSP, but it requires one to be a competent software engineer, not just a code monkey flipping registers to save 0,4935 ns on function call. Then you can run your code in qemu and test is to your heart’s content.
BSP, as in a “board support package”? Its always a bunch of poorly commented code and examples which try to hide all complexity behind single line do_complex_thing() type functions
Sorry, that doesn’t work this way :-(
(I still remember cursing STM’s USB implementation, where whoever wrote the code didn’t understand two-dimensional arrays and made a big mess, and other examples.
Or stories from coworkers about certain companies BSPs that were… less than bug-free.
You are 100% missing the point. Please read the blog post.
Not only is the project closed source, it appears to be somewhat closed access, in that you need to email the developer to discuss getting ahold of a copy. It’s possible I’m link-impaired, but I don’t think there’s a way to download an executable on your own. That’s not unexpected given the situation he describes.
It’s too bad he doesn’t just release it with zero support and zero contact info. Just create a github under a junk email address and don’t use any real contact info. I understand not wanting to support random “gimme gimme” people, but you can still share the code and disconnect yourself from it somehow.
Zephyr RTOS, native sim, forget doing proprietary emulation.
Use Forth. Instant turnaround time.