MicroPython
Unicorn Engine
MicroPython | Unicorn Engine | |
---|---|---|
212 | 19 | |
20,763 | 8,446 | |
0.4% | 0.7% | |
9.9 | 8.9 | |
4 days ago | 17 days ago | |
C | C | |
MIT | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
MicroPython
-
Why Lua Beats MicroPython for Serious Embedded Devs
it's not an embeddable runtime like Lua
While it's true you can't have multiple MicroPython interpreters running concurrently (or at least not easily; it's not that the design makes this impossible, it's just that all in all MicroPython is fairly young and development focus has been put elsewhere), it is possible to embed MicroPython. Not completely out of the box, needs some glue code etc. See for example https://github.com/micropython/micropython/tree/master/ports....
- 讓 MicroPython 輸入中文
-
MicroPython on M68k Mac
It's obviously not directly comparable - each port will be different - but startup time is <50ms on an RP2040 (Cortex M0 @133MHz):
https://github.com/micropython/micropython/issues/8420
-
MicroPython v1.25.0
Yes, although MicroPython is focused on running on microcontrollers it can be useful if you want to reduce memory consumption, flash space and even startup time on servers.
The challenge is that MicroPython has many fewer standard libraries:
https://github.com/micropython/micropython/wiki/Standard-Lib...
And so many Python libraries targeting CPython won't work out-of-the box and you'll need to modify them or use alternatives that do work on the MicroPython subset.
- MicroPython – Python for Microcontrollers
- Mruby/C and picoruby: high level langs in low-level devices?
-
Ask HN: What less-popular systems programming language are you using?
I'll link to it because many people don't know a version of Python runs on microcontrollers:
https://micropython.org/
-
Tactility: OS for the ESP32 Microcontroller Family
I'm personally working on something like this for the ESP32, but written on top of micropython [1]. A few things are written in C such as the display driver, but otherwise most things are in micropython. We chose the T-Watch 2020 V3 microphone variant as the platform [2].
Our objective is to build a modern PDA device via a mostly stand-alone watch that can be synced across devices (initially the Linux desktop). We want to achieve tasks that you might typically do on your desktop, focussed towards productivity.
We did consider a custom OS, but decided against it for a few reasons:
1. Allowing somebody else to handle basic OS stuff allows us to concentrate on what really matters, the higher level stuff on top.
2. Having multiple threads in micropython is super simple and we are able to run many active apps at the same time, rather than having to kill them off [3]. Our background apps can continuously interact with the network in the background.
3. Code written for micropython can be easily run on other Python-capable devices.
[1] https://micropython.org/
[2] https://lilygo.cc/products/t-watch-2020-v3
[3] https://tactility.one/#/application-lifecycle
- Release RP2350 and ESP32-C6 support, RISC-V native emitter, common TinyUSB code
-
Wasm2Mpy: Compiling WASM to MicroPython so it can run in Raspberry
tools/mpy_ld.py: https://github.com/micropython/micropython/blob/master/tools...
tools/mpy-tool.py lists opcodes: https://github.com/micropython/micropython/blob/master/tools...
Can the same be done with .pyc files; what are the advantages of MicroPython native modules?
Why does it need wasm2c?
Unicorn Engine
- Unicorn Engine 2.1.2
-
What Every Hacker Should Know About TLB Invalidation [pdf]
And us machine emulators too, like Fabrice Bellard (QEMu) and me (and my OP post detailed the failing of emulated TLB in QEMU as discovered in Unicorn emulator).
Unicorn emulator - https://github.com/unicorn-engine/unicorn
-
Capstone Disassembler Framework
If you find Capstone interesting, check out the Unicorn Engine.
https://github.com/unicorn-engine/unicorn
Also, if anyone is interested in an example of using capstone for basic disassembly and analysis, here is a link to my capstool project.
https://github.com/alexander-hanel/capstool
- Unicorn – lightweight multi-platform, multi-architecture CPU emulator framework
- Unicorn: Lightweight multi-platform, multi-architecture CPU emulator framework
- 86Box v4.0
-
Show HN: Tetris, but the blocks are ARM instructions that execute in the browser
OFRAK Tetris is a project I started at work about two weeks ago. It's a web-based game that works on desktop and mobile. I made it for my company to bring to events like DEF CON, and to promote our binary analysis and patching framework called OFRAK.
In the game, 32-bit, little-endian ARM assembly instructions fall, and you can modify the operands before executing them on a CPU emulator. There are two segments mapped – one for instructions, and one for data (though both have read, write, and execute permissions). Your score is a four byte signed integer stored at the virtual address pointed to by the R12 register, and the goal is to use the instructions that fall to make the score value in memory as high as possible. When it's game over, you can download your game as an ELF to relive the glory in GDB on your favorite ARM device.
The CPU emulator is a version of Unicorn (https://www.unicorn-engine.org/) that has been cross-compiled to WebAssembly (https://alexaltea.github.io/unicorn.js/), so everything on the page runs in the browser without the need for any complicated infrastructure on the back end.
Since I've only been working on this for a short period of time leading up to its debut at DEF CON, there are still many more features I'd eventually like to implement. These include adding support for other ISAs besides ARM, adding an instruction reference manual, and lots of little cleanups, bug fixes, and adjustments.
My highest score is 509,644,979, but my average is about 131,378.
I look forward to feedback, bug reports, feature requests, and strategy discussions!
-
It Takes 6 Days to Change 1 Line of Code
Entails hundreds of hours of single-stepping through that opcode in Linux kernel using an indirect operand pointing toward its own opcode (self-modifying code).
Even the extraordinaire Fabrice Bellard (author of QEMU) admitted that it is broke and did a total rewrite, which fixed tons of other issues.
https://github.com/unicorn-engine/unicorn/issues/364
- FOSS Simulator for debugging C code (even better if it supports some MCUs)
- Unicorn: Lightweight multi-platform, multi-architecture CPU emulation framework
What are some alternatives?
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
QEMU - Official QEMU mirror. Please see https://www.qemu.org/contribute/ for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website.
IronPython - Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime.
TinyVM - TinyVM is a small, fast, lightweight virtual machine written in pure ANSI C.
circuitpython - CircuitPython - a Python implementation for teaching coding with microcontrollers
CarpVM - "interesting" VM in C. Let's see how this goes.