-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
CrossBranch
Branch cross
in the repository contains some convenience/example scripts to cross-compiler MicroPython to various targets (currently that's Linux-based systems of various architectures). The branch is experimental, subject to change without notice, and it is being rebased regularly (which mean you should use git pull --rebase
command to update your local checkout).
You can browse contents of this branch at https://github.com/micropython/micropython/commits/cross (and due to the fact that branch is rebased on top of master, its changes are always "at the top").
The general idea is that there're unix/build-<target>.sh
scripts which build a MicroPython executable for a particular target, using suitable cross-compiling toolchain and set of options. To use it, you already should have a cross-compiler installed, build scripts try to provide links/instructions how to set it up. Cross-compiling options are configured in such way as to compile as standalone binary as possible (ultimately, linked fully statically and requiring just bare Linux kernel to run, but we're not yet there).
Beyond the build script, if a target is supported by QEMU user-level emulation, there's a convenience unix/micropython.<target>
script provided to run cross-compiled binary via such emulation (until binaries are fully static, this requires at least small target filesystem with libraries, etc. - it is usually part of cross-compiling toolchain). As a final convenience, tests/run-tests.<target>
script is provided, to run MicroPython testsuite using micropython.<target>
wrapper.