1
1
We love CircuitPython and would love to see it come to more microcontroller
2
- platforms. With 3.0 we've reworked CircuitPython to make it easier than ever to
2
+ platforms. Since 3.0 we've reworked CircuitPython to make it easier than ever to
3
3
add support. While there are some major differences between ports, this page
4
4
covers the similarities that make CircuitPython what it is and how that core
5
5
fits into a variety of microcontrollers.
@@ -19,7 +19,7 @@ prepping file systems and automatically running user code on boot. In
19
19
CircuitPython we've dubbed this component the supervisor because it monitors
20
20
and facilitates the VMs which run user Python code. Porting involves the
21
21
supervisor because many of the tasks it does while interfacing with the
22
- hardware. Once its going though , the REPL works and debugging can migrate to a
22
+ hardware. Once complete , the REPL works and debugging can migrate to a
23
23
Python based approach rather than C.
24
24
25
25
The third core piece is the plethora of low level APIs that CircuitPython
@@ -42,6 +42,44 @@ to the port's directory (in the top level until the ``ports`` directory is
42
42
present). This includes the Makefile and any C library resources. Make sure
43
43
these resources are compatible with the MIT License of the rest of the code!
44
44
45
+ Circuitpython has a number of modules enabled by default in
46
+ ``py/circuitpy_mpconfig.mk ``. Most of these modules will need to be disabled in
47
+ ``mpconfigboard.mk `` during the early stages of a port in order for it to
48
+ compile. As the port progresses in module support, this list can be pruned down
49
+ as a natural "TODO" list. An example minimal build list is shown below:
50
+
51
+ .. code-block :: makefile
52
+
53
+ # These modules are implemented in ports/<port>/common-hal:
54
+ CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create
55
+ CIRCUITPY_DIGITALIO = 0 # Typically the second module to create
56
+ CIRCUITPY_ANALOGIO = 0
57
+ CIRCUITPY_BUSIO = 0
58
+ CIRCUITPY_NEOPIXEL_WRITE = 0
59
+ CIRCUITPY_PULSEIO = 0
60
+ CIRCUITPY_OS = 0
61
+ CIRCUITPY_NVM = 0
62
+ CIRCUITPY_AUDIOBUSIO = 0
63
+ CIRCUITPY_AUDIOIO = 0
64
+ CIRCUITPY_ROTARYIO = 0
65
+ CIRCUITPY_RTC = 0
66
+ CIRCUITPY_FREQUENCYIO = 0
67
+ CIRCUITPY_I2CSLAVE = 0
68
+ CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok)
69
+
70
+ # These modules are implemented in shared-module/ - they can be included in
71
+ # any port once their prerequisites in common-hal are complete.
72
+ CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO
73
+ CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO
74
+ CIRCUITPY_PIXELBUF = 0 # Requires neopixel_write or SPI (dotstar)
75
+ CIRCUITPY_RANDOM = 0 # Requires OS
76
+ CIRCUITPY_STORAGE = 0 # Requires OS, filesystem
77
+ CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller
78
+ CIRCUITPY_USB_HID = 0 # Requires USB
79
+ CIRCUITPY_USB_MIDI = 0 # Requires USB
80
+ CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 # Does nothing without I2C
81
+ CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash
82
+
45
83
Step 2: Init
46
84
--------------
47
85
Once your build is setup, the next step should be to get your clocks going as
0 commit comments