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

Commit3b4a921

Browse files
Merge pull request#108 from ThomasWaldmann/typos-grammar
fix typos and grammar
2 parentsd11afd1 +885103b commit3b4a921

33 files changed

+132
-133
lines changed

‎.github/workflows/publish.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
name:Publish Python Package
99

1010
on:
11-
#trigger when publishing a release
11+
#Trigger when publishing a release.
1212
release:
1313
types:[published]
1414

15-
#also allow triggering this workflow manually for testing
15+
#Also allow triggering this workflow manually for testing.
1616
workflow_dispatch:
1717

1818
jobs:
@@ -24,7 +24,7 @@ jobs:
2424
-name:Checkout
2525
uses:actions/checkout@v3
2626
with:
27-
#just fetching 1 commit is not enough for setuptools-scm, so we fetch all
27+
#Fetching a single commit is not enough for setuptools-scm, so we fetch all commits.
2828
fetch-depth:0
2929
-name:Set up Python
3030
uses:actions/setup-python@v2
@@ -36,7 +36,7 @@ jobs:
3636
-name:Build package
3737
run:|
3838
python setup.py sdist
39-
rm dist/*.orig #clean sdist_upip noise
39+
rm dist/*.orig #Remove sdist_upip noise.
4040
-name:Publish to Test PyPI
4141
uses:pypa/gh-action-pypi-publish@release/v1
4242
with:

‎.github/workflows/run_tests.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
-name:Build MicroPython
3333
id:build_micropython
3434
run:|
35-
echo "Buildingmicropython"
35+
echo "BuildingMicroPython"
3636
git clone --depth 1 https://github.com/micropython/micropython.git
3737
pushd micropython/mpy-cross
3838
make
@@ -50,8 +50,8 @@ jobs:
5050
-name:Fetch binutils-esp32ulp
5151
id:fetch_binutils
5252
run:|
53-
echo "Fetching URL ofpre-built esp32ulp-elf binaries"
54-
## URL topre-built binaries is published inesp-idf
53+
echo "Fetching URL ofprebuilt esp32ulp-elf binaries"
54+
##TheURL toprebuilt binaries is published inESP-IDF
5555
IDFVER=v5.0.1
5656
curl -s \
5757
-o tools.json \

‎AUTHORS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
E-mail addresses listed here are not intended for support.
1+
Email addresses listed here are not intended for support requests.
22

33
micropython-esp32-ulp authors
44
-----------------------------

‎CHANGES‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
ChangeLog
2-
=========
1+
Change log
2+
==========
33

4-
1.2.0,release 2022-03-26
4+
1.2.0,released 2022-03-26
55

6-
-project moved tomicropythonorganization
7-
-project renamed from py-esp32-ulp to micropython-esp32-ulp
8-
- (no functional changes)
6+
-Project moved tothe MicroPythonorganization.
7+
-Project renamed from py-esp32-ulp to micropython-esp32-ulp.
8+
- (No functional changes.)
99

10+
1.1.0, released 2021-12-03
1011

11-
1.1.0, release 2021-12-03
12-
13-
- first pypi release
12+
- First PyPI release.
1413

‎README.rst‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ micropython-esp32-ulp is an assembler toolchain for the ESP32 ULP (Ultra Low-Pow
1515
Co-Processor, written in MicroPython.
1616

1717
It can translate small assembly language programs to a loadable/executable
18-
ULP-FSM (not RISC-V) machine code binary, directly ona ESP32 microcontroller.
18+
ULP-FSM (not RISC-V) machine code binary, directly onan ESP32 microcontroller.
1919

2020
This is intended as an alternative approach to assembling such programs using
2121
the `binutils-gdb toolchain<https://github.com/espressif/binutils-gdb/tree/esp32ulp-elf-2.35>`_
@@ -39,26 +39,26 @@ The following features are supported:
3939
* many ESP32 ULP code examples found on the web will work unmodified
4040
* a simple disassembler is also provided
4141

42-
.. [#f1]Note: the ESP32-S2 and ESP32-S3 have the same ULP binary format between each other
43-
but the binary format is differentthan that of the original ESP32 ULP. You need to
44-
select the ``esp32s2``cpu (`see docs</docs/index.rst>`_) when assembling code for
42+
.. [#f1]Note: the ESP32-S2 and ESP32-S3 have the same ULP binary format,
43+
but the binary format is differentfrom that of the original ESP32 ULP. You need to
44+
select the ``esp32s2``CPU (`see docs</docs/index.rst>`_) when assembling code for
4545
use on an ESP32-S2/S3.
4646
4747
.. [#f2]Note: The ESP32-S2 and ESP32-S3 have the same ULP binary format, but the peripheral
4848
register addresses (those accessed with REG_RD and REG_WR) are different. For best
4949
results, use the correct peripheral register addresses for the specific variant you
5050
are working with. The assembler (when used with ``cpu=esp32s2``) will accept
5151
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
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 canbeassembled unmodified for each
5454
variant and produce a correctly working binary - as long as only peripheral registers
5555
are used, which have the same relative offset across the variants. Use with care!
5656
5757
5858
Quick start
5959
-----------
6060

61-
To get going run the following directly on the ESP32:
61+
To get going, run the following directly on the ESP32:
6262

6363
..code-block::python
6464
@@ -77,7 +77,7 @@ To get going run the following directly on the ESP32:
7777
import counter
7878
7979
The `examples/counter.py</examples/counter.py>`_ example shows how to assemble code,
80-
load and run the resulting binary and exchange data between the ULP and the main CPU.
80+
load and run the resulting binary, and exchange data between the ULP and the main CPU.
8181

8282

8383
Documentation
@@ -88,9 +88,9 @@ See `docs/index.rst </docs/index.rst>`_.
8888
Requirements
8989
------------
9090

91-
The minimum supported version of MicroPython is v1.12. (For ESP32-S2 and S3
92-
devices, a version greater than v1.20 is required as versionsbefore that
93-
did notenable the ``esp32.ULP`` class).
91+
The minimum supported version of MicroPython is v1.12. (For ESP32-S2 andESP32-S3
92+
devices, a version greater than v1.20 is required, asearlierversionsdid not
93+
enable the ``esp32.ULP`` class).
9494

9595
An ESP32 device is required to run the ULP machine code binary produced by
9696
micropython-esp32-ulp.

‎demo.S‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ textstart: ld r0, r1, 0 # a comment!
2727
rsh r0, r1,42
2828
move r0, r1
2929
move r0,42
30-
move r0, textstart#moves abs addr of textstart to r0
30+
move r0, textstart#Move the absolute address of textstart to r0
3131
move r0, constant42
3232
stage_rst
3333
stage_inc42
@@ -70,10 +70,10 @@ data1: .space 4, 0x42
7070
data2:.skip4
7171
dataw:.word1,2,3,4
7272
datal:.long1,2,3,4
73-
datab:.byte1,2,3#test alignment/ fill upof section
73+
datab:.byte1,2,3#Test alignmentand fill upthe section
7474
dataend:
7575

7676
.bss
7777
bss0:.skip4
78-
bss1:.skip2#test alignment/ fill upof section
78+
bss1:.skip2#Test alignmentand fill upthe section
7979
bssend:

‎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.

‎esp32_ulp/__main__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main(fn, cpu):
2020
ifsys.argv[1]in ('-c','--mcpu'):
2121
cpu=sys.argv[2].lower()
2222
ifcpunotin ('esp32','esp32s2'):
23-
raiseValueError('Invalidcpu')
23+
raiseValueError('InvalidCPU')
2424
filename=sys.argv[3]
2525
main(filename,cpu)
2626

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp