{"id":14967222,"url":"https://github.com/micropython/micropython-esp32-ulp","last_synced_at":"2025-04-04T08:06:54.276Z","repository":{"id":39852306,"uuid":"124778828","full_name":"micropython/micropython-esp32-ulp","owner":"micropython","description":"ESP32 ULP Co-Processor toolchain implemented in MicroPython","archived":false,"fork":false,"pushed_at":"2024-12-15T14:54:59.000Z","size":190,"stargazers_count":123,"open_issues_count":16,"forks_count":25,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-28T07:04:29.007Z","etag":null,"topics":["assembler","esp32","micropython","ulp"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micropython.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-11T17:02:15.000Z","updated_at":"2025-02-01T21:52:21.000Z","dependencies_parsed_at":"2024-04-04T20:31:42.012Z","dependency_job_id":"e4e33f66-08c7-4b8c-9ac4-5408e92c81f0","html_url":"https://github.com/micropython/micropython-esp32-ulp","commit_stats":{"total_commits":145,"total_committers":5,"mean_commits":29.0,"dds":0.4413793103448276,"last_synced_commit":"50e1b97e37a91d909f1a59d65febf3ea62376af8"},"previous_names":["thomaswaldmann/py-esp32-ulp"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython%2Fmicropython-esp32-ulp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython%2Fmicropython-esp32-ulp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython%2Fmicropython-esp32-ulp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micropython%2Fmicropython-esp32-ulp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micropython","download_url":"https://codeload.github.com/micropython/micropython-esp32-ulp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247141465,"owners_count":20890641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembler","esp32","micropython","ulp"],"created_at":"2024-09-24T13:37:39.707Z","updated_at":"2025-04-04T08:06:54.251Z","avatar_url":"https://github.com/micropython.png","language":"Python","readme":".. start-badges\n\n.. image:: ../../actions/workflows/run_tests.yaml/badge.svg\n   :height: 20px\n   :target: ../../actions/workflows/run_tests.yaml\n   :alt: Build Status\n\n.. end-badges\n\n=====================\nmicropython-esp32-ulp\n=====================\n\nmicropython-esp32-ulp is an assembler toolchain for the ESP32 ULP (Ultra Low-Power)\nCo-Processor, written in MicroPython.\n\nIt can translate small assembly language programs to a loadable/executable\nULP-FSM (not RISC-V) machine code binary, directly on a ESP32 microcontroller.\n\nThis is intended as an alternative approach to assembling such programs using\nthe `binutils-gdb toolchain \u003chttps://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35\u003e`_\n(esp32-elf-as) from Espressif on a development machine.\n\nIt can also be useful in cases where esp32-elf-as is not available.\n\n\nFeatures\n--------\n\nThe following features are supported:\n\n* the entire `ESP32 ULP instruction set \u003chttps://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ulp_instruction_set.html\u003e`_\n* the entire `ESP32-S2 ULP instruction set \u003chttps://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/system/ulp_instruction_set.html\u003e`_\n  (this also covers the ESP32-S3) [#f1]_ [#f2]_\n* constants defined with ``.set``\n* constants defined with ``#define``\n* expressions in assembly code and constant definitions\n* RTC convenience macros (e.g. ``WRITE_RTC_REG``)\n* many ESP32 ULP code examples found on the web will work unmodified\n* a simple disassembler is also provided\n\n.. [#f1] Note: the ESP32-S2 and ESP32-S3 have the same ULP binary format between each other\n         but the binary format is different than that of the original ESP32 ULP. You need to\n         select the ``esp32s2`` cpu (`see docs \u003c/docs/index.rst\u003e`_) when assembling code for\n         use on an ESP32-S2/S3.\n\n.. [#f2] Note: The ESP32-S2 and ESP32-S3 have the same ULP binary format, but the peripheral\n         register addresses (those accessed with REG_RD and REG_WR) are different. For best\n         results, use the correct peripheral register addresses for the specific variant you\n         are working with. The assembler (when used with ``cpu=esp32s2``) will accept\n         addresses for any of the 3 variants, because they are translated into relative\n         offsets anyway and many registers live at the same relative offset on all 3 variants.\n         This conveniently means that the same assembly code can assembled unmodified for each\n         variant and produce a correctly working binary - as long as only peripheral registers\n         are used, which have the same relative offset across the variants. Use with care!\n\n\nQuick start\n-----------\n\nTo get going run the following directly on the ESP32:\n\n.. code-block:: python\n\n   # IMPORTANT: Ensure the ESP32 is connected to a network with internet connectivity.\n\n   # Step 1: Install micropython-esp32-ulp (for MicroPython v1.20 or newer)\n   import mip\n   mip.install('github:micropython/micropython-esp32-ulp')\n\n   # Step 1: Install micropython-esp32-ulp (for MicroPython older than v1.20)\n   import upip\n   upip.install('micropython-esp32-ulp')\n\n   # Step 2: Run an example\n   # First, upload examples/counter.py to the ESP32.\n   import counter\n\nThe `examples/counter.py \u003c/examples/counter.py\u003e`_ example shows how to assemble code,\nload and run the resulting binary and exchange data between the ULP and the main CPU.\n\n\nDocumentation\n-------------\nSee `docs/index.rst \u003c/docs/index.rst\u003e`_.\n\n\nRequirements\n------------\n\nThe minimum supported version of MicroPython is v1.12. (For ESP32-S2 and S3\ndevices, a version greater than v1.20 is required as versions before that\ndid not enable the ``esp32.ULP`` class).\n\nAn ESP32 device is required to run the ULP machine code binary produced by\nmicropython-esp32-ulp.\n\n\nLicense\n-------\n\nThis project is released under the `MIT License \u003c/LICENSE\u003e`_.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropython%2Fmicropython-esp32-ulp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicropython%2Fmicropython-esp32-ulp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicropython%2Fmicropython-esp32-ulp/lists"}