The ESP32 is a popular microcontroller from Espressif that can be used in many embedded applications. Robotic joints, smart car chargers, beer vat agitators and automated bread mixers are a few examples where this system-on-a-chip excels. It is cheap to buy and has a number of vendors providing low-cost development board kits that come with the microcontroller and many external connection points with peripherals. There is a large software ecosystem for the ESP32. Espressif maintains an SDK containing many C-language sample projects providing a starting point for a huge variety of software services and I/O needs. Third party projects provide additional sample code as well as support for other programming languages. For example, MicroPython is a mature project with sample code and officially supported by Espressif. The SDK provides tools to not just build an application but also merge a flash image, flash to the microcontroller and monitor the output. Is it possible to build the ESP32 load and emulate on another host OS? This paper explores the QEMU emulator and its ability to emulate the ethernet interface for the guest OS. Additionally, we look into the concept of containerizing the entire emulator and ESP32 load package such that a microcontroller flash image can successfully run with a one-step deployment of a Docker container.
翻译:摘要:ESP32是乐鑫科技推出的一款广泛应用于嵌入式领域的微控制器。诸如机器人关节、智能汽车充电器、啤酒桶搅拌器及自动面包搅拌机等场景,均是该系统级芯片的典型应用。该芯片成本低廉,且有多家供应商提供配套的低成本开发板套件,这些套件集成了微控制器并配备大量外部外设连接接口。ESP32拥有庞大的软件生态系统。乐鑫维护的软件开发工具包(SDK)提供了大量C语言示例工程,为多种软件服务及输入/输出需求提供了开发起点。第三方项目不仅提供了额外的示例代码,还支持其他编程语言,例如MicroPython这一成熟项目(提供示例代码)已获乐鑫官方支持。该SDK不仅支持应用构建,还可完成固件镜像合并、烧录至微控制器及输出监控等功能。是否能在其他主机操作系统上构建ESP32固件并完成仿真?本文探讨了QEMU仿真器对客户操作系统以太网接口的仿真能力,同时研究了将整个仿真器与ESP32固件包容器化的方案,从而通过单步部署Docker容器即可成功运行微控制器固件镜像。