Skip to content

Commit 4291a76

Browse files
committed
docs: Add compilation instructions for micropython-master
Signed-off-by: lbuque <[email protected]>
1 parent 80b66db commit 4291a76

File tree

3 files changed

+153
-3
lines changed

3 files changed

+153
-3
lines changed

docs/en/index.rst

+75
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,87 @@ Get the source code
4343
esp32
4444
------
4545

46+
micropython <= v1.20.0
47+
^^^^^^^^^^^^^^^^^^^^^^
48+
4649
.. note::
4750

4851
Please prepare `esp-idf release/v4.4 <https://github.com/espressif/esp-idf/tree/release/v4.4>`_ before compiling
4952

5053
For more detailed compilation of esp32, please refer to https://github.com/micropython/micropython/tree/master/ports/esp32
5154

55+
modify ``micropython/ports/esp32/main/CMakeLists.txt``:
56+
57+
.. code-block:: diff
58+
59+
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt
60+
index f8acfa905..209547892 100644
61+
--- a/ports/esp32/main/CMakeLists.txt
62+
+++ b/ports/esp32/main/CMakeLists.txt
63+
@@ -124,6 +124,7 @@ set(IDF_COMPONENTS
64+
ulp
65+
vfs
66+
xtensa
67+
+ esp_lcd
68+
)
69+
70+
if(IDF_VERSION_MINOR GREATER_EQUAL 1 OR IDF_VERSION_MAJOR GREATER_EQUAL 5)
71+
72+
build:
73+
74+
.. code-block:: shell
75+
76+
cd ports/esp32/
77+
make USER_C_MODULES=../../../extmod/lcd_binding_micropython/lcd/micropython.cmake
78+
79+
micropython == master
80+
^^^^^^^^^^^^^^^^^^^^^
81+
82+
.. note::
83+
84+
Please prepare `esp-idf v5.0.2 <https://github.com/espressif/esp-idf/tree/v5.0.2>`_ before compiling
85+
86+
For more detailed compilation of esp32, please refer to https://github.com/micropython/micropython/tree/master/ports/esp32
87+
88+
modify ``lcd_binding_micropython/lcd/hal/esp32/esp32.c`` :
89+
90+
.. code-block:: diff
91+
92+
diff --git a/lcd/hal/esp32/esp32.c b/lcd/hal/esp32/esp32.c
93+
index b100971..907feeb 100644
94+
--- a/lcd/hal/esp32/esp32.c
95+
+++ b/lcd/hal/esp32/esp32.c
96+
@@ -119,8 +119,8 @@ inline void hal_lcd_spi_panel_deinit(mp_obj_base_t *self)
97+
98+
for (int i = 0; i < 3; i++) {
99+
if (pins[i] != -1) {
100+
- gpio_pad_select_gpio(pins[i]);
101+
- gpio_matrix_out(pins[i], SIG_GPIO_OUT_IDX, false, false);
102+
+ esp_rom_gpio_pad_select_gpio(pins[i]);
103+
+ gpio_iomux_out(pins[i], SIG_GPIO_OUT_IDX, false);
104+
gpio_set_direction(pins[i], GPIO_MODE_INPUT);
105+
}
106+
}
107+
108+
modify ``micropython/ports/esp32/esp32_common.cmake`` :
109+
110+
.. code-block:: diff
111+
112+
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
113+
index 37a19316b..6be95ddf5 100644
114+
--- a/ports/esp32/esp32_common.cmake
115+
+++ b/ports/esp32/esp32_common.cmake
116+
@@ -136,6 +136,7 @@ list(APPEND IDF_COMPONENTS
117+
ulp
118+
vfs
119+
xtensa
120+
+ esp_lcd
121+
)
122+
123+
# Register the main IDF component.
124+
125+
build:
126+
52127
.. code-block:: shell
53128
54129
cd ports/esp32/

docs/zh_CN/api-reference/lcd.RM67162.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Methods
133133
| other | ((0x00, 0, 0, 0, 0), (0x60, 0, 0, 0, 0), (0xC0, 0, 0, 0, 0), (0xA0, 0, 0, 0, 0)) |
134134
+---------+----------------------------------------------------------------------------------------------------------+
135135

136-
.. method:: ILI9488.vscroll_area(tfa: int, height: int, bfa: int)
136+
.. method:: RM67162.vscroll_area(tfa: int, height: int, bfa: int)
137137

138138
设置垂直滚动参数。
139139

@@ -143,9 +143,9 @@ Methods
143143

144144
- ``bfa`` 是以像素为单位的底部固定区域。 底部固定区域是显示帧缓冲区的下部,不会滚动。
145145

146-
.. method:: ILI9488.vscroll_start(address: int, order: bool=False)
146+
.. method:: RM67162.vscroll_start(address: int, order: bool=False)
147147

148148
设置垂直滚动地址。
149149

150150
- ``address`` 是以像素为单位的垂直滚动起始地址。 垂直滚动起始地址是帧缓冲区中的行,将是 TFA 之后显示的第一行。
151-
- ``order`` 是垂直刷新顺序。 当``order`` == ``False``时,LCD垂直刷新从上到下; 当``order`` == ``False``时,LCD垂直刷新从下到上。
151+
- ``order`` 是垂直刷新顺序。 当 ``order`` == ``False`` 时,LCD垂直刷新从上到下; 当 ``order`` == ``False`` 时,LCD垂直刷新从下到上。

docs/zh_CN/index.rst

+75
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,87 @@
4343
esp32
4444
------
4545

46+
micropython <= v1.20.0
47+
^^^^^^^^^^^^^^^^^^^^^^
48+
4649
.. note::
4750

4851
编译前请准备好`esp-idf release/v4.4 <https://github.com/espressif/esp-idf/tree/release/v4.4>`_
4952

5053
关于esp32更详细的编译说明,请参考 https://github.com/micropython/micropython/tree/master/ports/esp32
5154

55+
修改 ``micropython/ports/esp32/main/CMakeLists.txt`` :
56+
57+
.. code-block:: diff
58+
59+
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt
60+
index f8acfa905..209547892 100644
61+
--- a/ports/esp32/main/CMakeLists.txt
62+
+++ b/ports/esp32/main/CMakeLists.txt
63+
@@ -124,6 +124,7 @@ set(IDF_COMPONENTS
64+
ulp
65+
vfs
66+
xtensa
67+
+ esp_lcd
68+
)
69+
70+
if(IDF_VERSION_MINOR GREATER_EQUAL 1 OR IDF_VERSION_MAJOR GREATER_EQUAL 5)
71+
72+
编译:
73+
74+
.. code-block:: shell
75+
76+
cd ports/esp32/
77+
make USER_C_MODULES=../../../extmod/lcd_binding_micropython/lcd/micropython.cmake
78+
79+
micropython == master
80+
^^^^^^^^^^^^^^^^^^^^^
81+
82+
.. note::
83+
84+
编译前请准备好`esp-idf v5.0.2 <https://github.com/espressif/esp-idf/tree/v5.0.2>`_
85+
86+
关于esp32更详细的编译说明,请参考 https://github.com/micropython/micropython/tree/master/ports/esp32
87+
88+
修改 ``lcd_binding_micropython/lcd/hal/esp32/esp32.c`` :
89+
90+
.. code-block:: diff
91+
92+
diff --git a/lcd/hal/esp32/esp32.c b/lcd/hal/esp32/esp32.c
93+
index b100971..907feeb 100644
94+
--- a/lcd/hal/esp32/esp32.c
95+
+++ b/lcd/hal/esp32/esp32.c
96+
@@ -119,8 +119,8 @@ inline void hal_lcd_spi_panel_deinit(mp_obj_base_t *self)
97+
98+
for (int i = 0; i < 3; i++) {
99+
if (pins[i] != -1) {
100+
- gpio_pad_select_gpio(pins[i]);
101+
- gpio_matrix_out(pins[i], SIG_GPIO_OUT_IDX, false, false);
102+
+ esp_rom_gpio_pad_select_gpio(pins[i]);
103+
+ gpio_iomux_out(pins[i], SIG_GPIO_OUT_IDX, false);
104+
gpio_set_direction(pins[i], GPIO_MODE_INPUT);
105+
}
106+
}
107+
108+
修改 ``micropython/ports/esp32/esp32_common.cmake`` :
109+
110+
.. code-block:: diff
111+
112+
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
113+
index 37a19316b..6be95ddf5 100644
114+
--- a/ports/esp32/esp32_common.cmake
115+
+++ b/ports/esp32/esp32_common.cmake
116+
@@ -136,6 +136,7 @@ list(APPEND IDF_COMPONENTS
117+
ulp
118+
vfs
119+
xtensa
120+
+ esp_lcd
121+
)
122+
123+
# Register the main IDF component.
124+
125+
编译:
126+
52127
.. code-block:: shell
53128
54129
cd ports/esp32/

0 commit comments

Comments
 (0)