If you navigate to the micropython directory where you cloned the MicroPython kernel, you'll find that the kernel is organized as in the following screenshot:
Upon examination, you'll notice that there are several top-level directories. The information contained in each of these directories can be found in the following table:
Folder |
Description |
docs |
Contains documentation for different major ports. |
drivers |
Contains external device drivers for items, such as displays, memory devices, radios, and SD cards. |
examples |
Contains example Python scripts. |
extmod |
Contains additional (non-core) modules that are implemented in C, such as crypto and filesystems. |
mpy-cross |
The MicroPython cross-compiler, which generates bytecode from scripts. |
ports |
Contains all the different architecture ports supported by MicroPython. |
py |
The Python implementation, which includes the Python core, compiler, libraries, and runtime. |
tests |
Contains the test framework for MicroPython. |
tools |
Contains scripts that can be useful for developing the MicroPython kernel. |
I recommend that you briefly take some time to explore these directories and get a better feel for what is in these folders. We will spend most of our time in the ports/STM32 directory but there could be tools or modules elsewhere that it would be useful to know about, depending on what you are looking to modify in the kernel.