Skip to content

Commit 33b0246

Browse files
committed
Add intro and directory structure description
1 parent f48de80 commit 33b0246

File tree

4 files changed

+72
-1
lines changed

4 files changed

+72
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ __pycache__/
1010
.Python
1111
env/
1212
build/
13+
_build/
1314
develop-eggs/
1415
dist/
1516
downloads/

directories.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.

index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ Welcome to MicroPython Development Documentation's documentation!
99
Contents:
1010

1111
.. toctree::
12-
:maxdepth: 2
12+
:maxdepth: 2
1313

14+
intro.rst
15+
directories.rst
1416

1517

1618
Indices and tables

intro.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Introduction
2+
************
3+
4+
This is an unofficial MicroPython development guide. It was written to make it
5+
easier for new developers to start contributing code to the MicroPython
6+
project. It's not comprehensive, and at times might even be wrong, but it is
7+
some starting point.

0 commit comments

Comments
 (0)