You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+23-4
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ micropython-esp32-ulp is an assembler toolchain for the ESP32 ULP (Ultra Low-Pow
15
15
Co-Processor, written in MicroPython.
16
16
17
17
It can translate small assembly language programs to a loadable/executable
18
-
ULPmachine code binary, directly on the ESP32 microcontroller.
18
+
ULP-FSM (not RISC-V) machine code binary, directly on a ESP32 microcontroller.
19
19
20
20
This is intended as an alternative approach to assembling such programs using
21
21
the `binutils-gdb toolchain <https://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35>`_
@@ -30,13 +30,30 @@ Features
30
30
The following features are supported:
31
31
32
32
* the entire `ESP32 ULP instruction set <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ulp_instruction_set.html>`_
33
+
* the entire `ESP32-S2 ULP instruction set <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/ulp_instruction_set.html>`_
34
+
(this also covers the ESP32-S3) [#f1]_ [#f2]_
33
35
* constants defined with ``.set``
34
36
* constants defined with ``#define``
35
37
* expressions in assembly code and constant definitions
36
38
* RTC convenience macros (e.g. ``WRITE_RTC_REG``)
37
39
* many ESP32 ULP code examples found on the web will work unmodified
38
40
* a simple disassembler is also provided
39
41
42
+
.. [#f1] Note: the ESP32-S2 and ESP32-S3 have the same ULP binary format between each other
43
+
but the binary format is different than that of the original ESP32 ULP. You need to
44
+
select the ``esp32s2`` cpu (`see docs </docs/index.rst>`_) when assembling code for
45
+
use on an ESP32-S2/S3.
46
+
47
+
.. [#f2] Note: The ESP32-S2 and ESP32-S3 have the same ULP binary format, but the peripheral
48
+
register addresses (those accessed with REG_RD and REG_WR) are different. For best
49
+
results, use the correct peripheral register addresses for the specific variant you
50
+
are working with. The assembler (when used with ``cpu=esp32s2``) will accept
51
+
addresses for any of the 3 variants, because they are translated into relative
52
+
offsets anyway and many registers live at the same relative offset on all 3 variants.
53
+
This conveniently means that the same assembly code can assembled unmodified for each
54
+
variant and produce a correctly working binary - as long as only peripheral registers
55
+
are used, which have the same relative offset across the variants. Use with care!
56
+
40
57
41
58
Quick start
42
59
-----------
@@ -66,10 +83,12 @@ See `docs/index.rst </docs/index.rst>`_.
66
83
Requirements
67
84
------------
68
85
69
-
The minimum supported version of MicroPython is v1.12.
86
+
The minimum supported version of MicroPython is v1.12. (For ESP32-S2 and S3
87
+
devices, a version greater than v1.20 is required as versions before that
88
+
did not enable the ``esp32.ULP`` class).
70
89
71
-
An ESP32 is required to run the ULP machine code binary produced by micropython-esp32-ulp
72
-
(the ESP32-S2 will not work as it is not binary compatible with the ESP32).
90
+
An ESP32 device is required to run the ULP machine code binary produced by
0 commit comments