Running micropython in Linux |
|
Build micropython as follows:
- Clone the sources:
git clone -b c9eb7eb449a246c https://github.com/micropython/micropython.git cd micropython
- Apply the attached patch (micropython-build-fix.patch):
patch -p1 < micropython-build-fix.patch
- Build the ports/unix/micropython binary:
cd ports/unix make -j9 -s
Run micropython on the target from an NFS-mounted file system. For instance:
/root # /tmp/m/micropython
MicroPython v1.10-46-g98f790b03-dirty on 2019-02-04; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> print("123")
123
>>> hex(123)
'0x7b'
>>> import uzlib
>>> import uio
|