Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5980c7a

Browse files
docs: fix typos, grammar, punctuation
1 parentb737c03 commit5980c7a

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

‎docs/disassembler.rst‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Disassembling a file
4242
The simplest and default mode of the disassembler is to disassemble the
4343
specified file.
4444

45-
Note that the ULP header isvalidates and files with unknown magic bytes will be
45+
Note that the ULP header isvalidated and files with unknown magic bytes will be
4646
rejected. The correct 4 magic bytes at the start of a ULP binary are ``ulp\x00``.
4747

4848
Example disassembling an ESP32 ULP binary:
@@ -75,13 +75,13 @@ Example disassembling an ESP32-S2 ULP binary:
7575
Disassembling a byte sequence
7676
-----------------------------
7777

78-
The ``-m`` option allows disassembling asequences hex letters representing
78+
The ``-m`` option allows disassembling asequence of hex letters representing
7979
ULP instructions.
8080

8181
This option expects the actual instructions directly, without any ULP header.
8282

8383
The sequence must contain a number of hex letters exactly divisible by 8, i.e.
84-
8, 16, 24, etc, because each 32-bit word is made up of 8 hex letters. Spaces
84+
8, 16, 24, etc., because each 32-bit word is made up of 8 hex letters. Spaces
8585
can be included in the sequence and they are ignored.
8686

8787
The typical use case for this feature is to copy/paste some instructions from
@@ -148,11 +148,11 @@ The disassembler also works when used on an ESP32 device.
148148

149149
To use the disassembler on a real device:
150150

151-
*ensure ``micropython-esp32-ulp`` is installed on the device (see `docs/index.rst</docs/index.rst>`_).
152-
*upload ``tools/disassemble.py`` ``tools/decode.py`` and ``tools/decode_s2.py`` to the device
151+
*Ensure ``micropython-esp32-ulp`` is installed on the device (see `docs/index.rst</docs/index.rst>`_).
152+
*Upload ``tools/disassemble.py``, ``tools/decode.py``, and ``tools/decode_s2.py`` to the device
153153
(any directory will do, as long as those 3 files are in the same directory)
154-
*the following example code assumes you placed the 3 files into the device's "root" directory
155-
*run the following (note, we must specify whichthe cpu the binary is for):
154+
*The following example code assumes you placed the 3 files into the device's "root" directory
155+
*Run the following (note, we must specify whichCPU the binary is for):
156156

157157
..code-block::python
158158

‎docs/index.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ On the ESP32
3737
++++++++++++
3838

3939
The simplest example to try on the ESP32 is `counter.py</examples/counter.py>`_.
40-
It shows how to assemble code, load and run the resulting binary and exchange
40+
It shows how to assemble code, load and run the resulting binary, and exchange
4141
data between the ULP and the main CPU.
4242

4343
Run the ``counter.py`` example:
@@ -65,7 +65,7 @@ follows:
6565
micropython -m esp32_ulp path/to/code.S# this results in path/to/code.ulp
6666
6767
The assembler supports selecting a CPU to assemble for using the ``-c`` option
68-
(validcpu's are ``esp32`` and ``esp32s2``):
68+
(validCPUs are ``esp32`` and ``esp32s2``):
6969

7070
..code-block::shell
7171
@@ -91,7 +91,7 @@ This can be useful in battery-powered applications where every second of sleep
9191
time matters.
9292

9393
Splitting the assembly and load stage can be combined with other techniques,
94-
for example to implement a cachingmechansim for the ULP binary that
94+
for example, to implement a cachingmechanism for the ULP binary that
9595
automatically updates the binary every time the assembly source code changes.
9696

9797
The ``esp32_ulp.assemble_file`` function can be used to assemble and link an
@@ -128,7 +128,7 @@ That file can then be loaded directly without assembling the source again.
128128
# start the ULP
129129
# assemble_file printed offsets in number of 32-bit words.
130130
# ulp.run() expects an offset in number of bytes.
131-
# Thus, multiply the offsetto our entry point by 4.
131+
# Thus, multiply the offsetof our entry point by 4.
132132
# e.g. for an offset of 2:
133133
# 2 words * 4 = 8 bytes
134134
ulp.run(2*4)# specify the offset of the entry point label
@@ -173,14 +173,14 @@ Testing
173173
-------
174174

175175
There are unit tests and also compatibility tests that check whether the binary
176-
output is identicalwith what Espressif's esp32-elf-as (from their `binutils-gdb fork
176+
output is identicalto what Espressif's esp32-elf-as (from their `binutils-gdb fork
177177
<https://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35>`_) produces.
178178

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

183-
Consult theGithub Actions `workflow definition file</.github/workflows/run_tests.yaml>`_
183+
Consult theGitHub Actions `workflow definition file</.github/workflows/run_tests.yaml>`_
184184
for how to run the different tests.
185185

186186

‎docs/preprocess.rst‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ provided by the ESP-IDF framework, along with constants defined in the
1111
framework's include files (such as ``RTC_GPIO_IN_REG``), to make reading
1212
and writing from/to peripheral registers much easier.
1313

14-
In order to do this the preprocessor has two capabilities:
14+
In order to do this, the preprocessor has two capabilities:
1515

1616
1. Parse and replace identifiers defined with ``#define``
1717
2. Recognise the ``WRITE_RTC_*`` and ``READ_RTC_*`` macros and expand
@@ -21,7 +21,7 @@ In order to do this the preprocessor has two capabilities:
2121
Usage
2222
------------------------
2323

24-
Normally the assembler is called as follows
24+
Normally the assembler is called as follows:
2525

2626
..code-block::python
2727
@@ -49,8 +49,8 @@ Using a "Defines Database"
4949
Because the micropython-esp32-ulp assembler was built for running on the ESP32
5050
microcontroller with limited RAM, the preprocessor aims to work there too.
5151

52-
To handle large number of defined constants (such as the ``RTC_*`` constants from
53-
the ESP-IDF) the preprocessor can use a database (based onBerkleyDB) stored on the
52+
To handlealarge number of defined constants (such as the ``RTC_*`` constants from
53+
the ESP-IDF) the preprocessor can use a database (based onBerkeley DB) stored on the
5454
device's filesystem for looking up defines.
5555

5656
The database needs to be populated before preprocessing. (Usually, when only using
@@ -67,7 +67,7 @@ are not needed on the device either.)
6767
database from include files. The resulting file will be called
6868
``defines.db``.
6969

70-
(The followingassume running on a PC. To do this on device, refer to the
70+
(The followingassumes running on a PC. To do this on device, refer to the
7171
`esp32_ulp/parse_to_db.py<../esp32_ulp/parse_to_db.py>`_ file.)
7272

7373
..code-block::bash
@@ -83,22 +83,22 @@ are not needed on the device either.)
8383
8484
# if file system space is not a concern, the following can be convenient
8585
# by including all relevant include files from the ESP-IDF framework.
86-
# This results in an approximately2MB large database.
86+
# This results in an approximately2 MB large database.
8787
micropython -m esp32_ulp.parse_to_db \
8888
esp-idf/components/soc/esp32/include/soc/*.h \
8989
esp-idf/components/esp_common/include/*.h
9090
9191
# most ULP code uses only 5 include files. Parsing only those into the
9292
# database should thus allow assembling virtually all ULP code one would
9393
# find or want to write.
94-
# This results in an approximately250kB large database.
94+
# This results in an approximately250 kB large database.
9595
micropython -m esp32_ulp.parse_to_db \
9696
esp-idf/components/soc/esp32/include/soc/{soc,soc_ulp,rtc_cntl_reg,rtc_io_reg,sens_reg}.h
9797
9898
9999
..warning::
100100

101-
`:warning:`Ensure that you include the header files for the correct
101+
Ensure that you include the header files for the correct
102102
variant you are working with. In the example code above, simply switch
103103
``esp32`` to ``esp32s2`` or ``esp32s3`` in the path to the include files.
104104

@@ -118,7 +118,7 @@ are not needed on the device either.)
118118
is taken not to create an empty database file, cluttering up the filesystem,
119119
when not needed).
120120

121-
If you do not want the preprocessoruse use a DefinesDB, pass ``False`` to
121+
If you do not want the preprocessorto use a DefinesDB, pass ``False`` to
122122
the ``use_defines_db`` argument of the ``preprocess`` convenience function,
123123
or instantiate the ``Preprocessor`` class directly, without passing it a
124124
DefinesDB instance via ``use_db``.
@@ -129,7 +129,7 @@ Design choices
129129

130130
The preprocessor does not support:
131131

132-
1. Functionstyle macros such as:code:`#define f(a,b) (a+b)`
132+
1. Function-style macros such as:code:`#define f(a,b) (a+b)`
133133

134134
This is not important, because there are only few RTC macros that need
135135
to be supported and they are simply implemented as Python functions.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp