Skip to content

Commit

Permalink
Update documentation to reflect the new ESP32-S2/S3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
wnienhaus committed Jul 12, 2023
1 parent 0111dc5 commit 78275c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
16 changes: 12 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ micropython-esp32-ulp is an assembler toolchain for the ESP32 ULP (Ultra Low-Pow
Co-Processor, written in MicroPython.

It can translate small assembly language programs to a loadable/executable
ULP machine code binary, directly on the ESP32 microcontroller.
ULP-FSM (not RISC-V) machine code binary, directly on a ESP32 microcontroller.

This is intended as an alternative approach to assembling such programs using
the `binutils-gdb toolchain <https://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35>`_
Expand All @@ -30,13 +30,19 @@ Features
The following features are supported:

* the entire `ESP32 ULP instruction set <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ulp_instruction_set.html>`_
* the entire `ESP32-S2 ULP instruction set <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/ulp_instruction_set.html>`_
(this also covers the ESP32-S3) [#f1]_
* constants defined with ``.set``
* constants defined with ``#define``
* expressions in assembly code and constant definitions
* RTC convenience macros (e.g. ``WRITE_RTC_REG``)
* many ESP32 ULP code examples found on the web will work unmodified
* a simple disassembler is also provided

.. [#f1] Note: the ESP32-S2 and ESP32-S3 have the same ULP binary format between each other
but the binary format is different than that of the original ESP32 ULP. You need to
select the ``esp32s2`` cpu (`see docs </docs/disassembler.rst>`_) when assembling code
for use on an ESP32-S2/S3.
Quick start
-----------
Expand Down Expand Up @@ -66,10 +72,12 @@ See `docs/index.rst </docs/index.rst>`_.
Requirements
------------

The minimum supported version of MicroPython is v1.12.
The minimum supported version of MicroPython is v1.12. (For ESP32-S2 and S3
devices, a version greater than v1.20 is required as versions before that
did not enable the ``esp32.ULP`` class).

An ESP32 is required to run the ULP machine code binary produced by micropython-esp32-ulp
(the ESP32-S2 will not work as it is not binary compatible with the ESP32).
An ESP32 device is required to run the ULP machine code binary produced by
micropython-esp32-ulp.


License
Expand Down
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ assembly source file into a machine code binary file with a ``.ulp`` extension.
That file can then be loaded directly without assembling the source again.

1. Create/upload an assembly source file and run the following to get a
loadable ULP binary as a ``.ulp`` file:
loadable ULP binary as a ``.ulp`` file (specify ``cpu='esp32s2'`` if you
have an ESP32-S2 or ESP32-S3 device):

.. code-block:: python
Expand Down Expand Up @@ -160,7 +161,6 @@ Currently the following are not supported:
* assembler macros using ``.macro``
* preprocessor macros using ``#define A(x,y) ...``
* including files using ``#include``
* ESP32-S2 (not binary compatible with the ESP32)


Testing
Expand All @@ -171,7 +171,8 @@ output is identical with what Espressif's esp32-elf-as (from their `binutils-gdb
<https://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35>`_) produces.

micropython-esp32-ulp has been tested on the Unix port of MicroPython and on real ESP32
devices with the chip type ESP32D0WDQ6 (revision 1) without SPIRAM.
devices with the chip type ESP32D0WDQ6 (revision 1) without SPIRAM as well as ESP32-S2
(ESP32-S2FH4) and ESP32-S3 (ESP32-S3R8) devices.

Consult the Github Actions `workflow definition file </.github/workflows/run_tests.yaml>`_
for how to run the different tests.
Expand Down

0 comments on commit 78275c2

Please sign in to comment.