Running micropython in Linux Print

 

Build micropython as follows:

  1. Clone the sources:
  2. git clone https://github.com/micropython/micropython.git
    cd micropython

  3. Apply the attached patch (micropython-build-fix.patch):
  4. patch -p1 < micropython-build-fix.patch

  5. Build the bports/unix/micropython binary:
  6. 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