|
| 1 | +Directory Structure |
| 2 | +******************* |
| 3 | + |
| 4 | +The MicroPython repository is divided into a number of directories, each with |
| 5 | +its own function. Some of them include: |
| 6 | + |
| 7 | + |
| 8 | +Docs, Logo and Examples |
| 9 | +======================= |
| 10 | + |
| 11 | +The user documentation for all ports lives in the ``docs`` directory, with some |
| 12 | +example code in the ``examples`` directory. The ``logo`` directory contains the |
| 13 | +MicroPython logo in various formats. |
| 14 | + |
| 15 | + |
| 16 | +Tests |
| 17 | +===== |
| 18 | + |
| 19 | +All tests live in the ``tests`` directory. |
| 20 | + |
| 21 | + |
| 22 | +Python Code |
| 23 | +=========== |
| 24 | + |
| 25 | +The ``py`` directory contains the bulk of code for the compiler, runtime |
| 26 | +environment and core library of MicroPython. This is where we will be looking |
| 27 | +for API functions and macros. |
| 28 | + |
| 29 | + |
| 30 | +Port-specific Code |
| 31 | +================== |
| 32 | + |
| 33 | +The directories such as ``esp8266``, ``cc3200``, ``pic16bit``, ``teensy``, |
| 34 | +``stmhal``, ``bare-arm``, ``qemu-arm``, ``unix`` and ``windows`` contain code |
| 35 | +and tools specific to particular ports of MicroPython. If you are working on a |
| 36 | +feature to be added for a specific hardware, this is probably the best place to |
| 37 | +put your files. |
| 38 | + |
| 39 | + |
| 40 | +Minimal Port |
| 41 | +============ |
| 42 | + |
| 43 | +The ``minimal`` directory contains the minimum of files that a new port needs. |
| 44 | +You can use this as a template for starting new ports of MicroPython. |
| 45 | + |
| 46 | + |
| 47 | +Common Parts |
| 48 | +============ |
| 49 | + |
| 50 | +The ``extmod`` directory contains source of MicroPython modules that may are |
| 51 | +not part of the core library, but are useful for multiple ports. The |
| 52 | +``drivers`` directory has code for libraries that communicate with various |
| 53 | +additional hardware, such as displays or sensors. |
| 54 | + |
| 55 | + |
| 56 | +Tools and Utilities |
| 57 | +=================== |
| 58 | + |
| 59 | +The ``tools`` directory contains various tools useful for working with |
| 60 | +MicroPython. The ``mpy-cross`` directory has code for the MicroPython |
| 61 | +cross-compiler, which can be used to generate frozen bytecode modules. |
0 commit comments