Skip to content

Commit a7e62af

Browse files
committedMar 17, 2025
doc: lilygo: adopt zephyr:board-supported-hw directive
Replace manually authored hardware features table with the new Zephyr board supported hardware directive which automatically generates an up-to-date table based on the boards' Devicetree. Removed some typos. Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
1 parent d6c59f0 commit a7e62af

File tree

5 files changed

+235
-141
lines changed

5 files changed

+235
-141
lines changed
 

‎boards/lilygo/ttgo_lora32/doc/index.rst

+11-35
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,13 @@ It's available in two versions supporting two different frequency ranges and fea
1515

1616
Some of the ESP32 I/O pins are accessible on the board's pin headers.
1717

18-
Functional Description
19-
**********************
20-
21-
The following table below describes the key components, interfaces, and controls
22-
of the Lilygo TTGO LoRa32 board.
23-
24-
.. _SX127x: https://www.semtech.com/products/wireless-rf/lora-connect/sx1276#documentation
25-
.. _ESP32-PICO-D4: https://www.espressif.com/sites/default/files/documentation/esp32-pico-d4_datasheet_en.pdf
26-
.. _SSD1306: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
27-
28-
+------------------+-------------------------------------------------------------------------+
29-
| Key Component | Description |
30-
+==================+=========================================================================+
31-
| ESP32-PICO-D4 | This `ESP32-PICO-D4`_ module provides complete Wi-Fi and Bluetooth |
32-
| | functionalities and integrates a 4-MB SPI flash. |
33-
+------------------+-------------------------------------------------------------------------+
34-
| Diagnostic LED | One user LED connected to the GPIO pin. |
35-
+------------------+-------------------------------------------------------------------------+
36-
| USB Port | USB interface. Power supply for the board as well as the |
37-
| | serial communication interface between a computer and the board. |
38-
| | Micro-USB type connector. |
39-
+------------------+-------------------------------------------------------------------------+
40-
| Power Switch | Sliding power switch. |
41-
+------------------+-------------------------------------------------------------------------+
42-
| OLED display | Built-in OLED display \(`SSD1306`_, 0.96", 128x64 px\) controlled |
43-
| | by I2C interface |
44-
+------------------+-------------------------------------------------------------------------+
45-
| SX1276/SX1278 | LoRa radio frontend chip, connected via SPI. |
46-
| | Use SX1276 for 433MHz and SX1276 for 868/915/923MHz. |
47-
+------------------+-------------------------------------------------------------------------+
48-
| TF card slot | TF card slot wired to the SDHC interface of the MCU. |
49-
+------------------+-------------------------------------------------------------------------+
18+
Hardware
19+
********
20+
21+
Supported Features
22+
==================
5023

24+
.. zephyr:board-supported-hw::
5125
5226
Start Application Development
5327
*****************************
@@ -61,7 +35,7 @@ System requirements
6135
Prerequisites
6236
=============
6337

64-
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
38+
Espressif HAL requires WiFi and Bluetooth binary blobs in order to work. Run the command
6539
below to retrieve those files.
6640

6741
.. code-block:: console
@@ -78,7 +52,7 @@ Building & Flashing
7852
Simple boot
7953
===========
8054

81-
The board could be loaded using the single binary image, without 2nd stage bootloader.
55+
The board could be loaded using a single binary image, without 2nd stage bootloader.
8256
It is the default option when building the application without additional configuration.
8357

8458
.. note::
@@ -108,7 +82,7 @@ There are two options to be used when building an application:
10882
Sysbuild
10983
========
11084

111-
The sysbuild makes possible to build and flash all necessary images needed to
85+
The sysbuild makes it possible to build and flash all necessary images needed to
11286
bootstrap the board with the ESP32-PICO-D4 SoC.
11387

11488
To build the sample application using sysbuild use the command:
@@ -218,3 +192,5 @@ Related Documents
218192
- `ESP32-PICO-D4 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-pico-d4_datasheet_en.pdf>`_ (PDF)
219193
- `ESP32 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_ (PDF)
220194
- `ESP32 Hardware Reference <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/index.html>`_
195+
- `SX127x Datasheet <https://www.semtech.com/products/wireless-rf/lora-connect/sx1276#documentation>`_
196+
- `SSD1306 Datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf>`_ (PDF)
+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
.. zephyr:board:: ttgo_lora32
2+
3+
Overview
4+
********
5+
6+
The Lilygo TTGO LoRa32 is a development board for LoRa applications based on the ESP32-PICO-D4.
7+
8+
It's available in two versions supporting two different frequency ranges and features the following integrated components:
9+
10+
- ESP32-PICO-D4 chip (240MHz dual core, 600 DMIPS, 520KB SRAM, Wi-Fi)
11+
- SSD1306, 128x64 px, 0.96" screen
12+
- SX1278 (433MHz) or SX1276 (868/915/923MHz) LoRa radio frontend
13+
- JST GH 2-pin battery connector
14+
- TF card slot
15+
16+
Some of the ESP32 I/O pins are accessible on the board's pin headers.
17+
18+
Supported Features
19+
==================
20+
21+
.. zephyr:board-supported-hw::
22+
23+
Start Application Development
24+
*****************************
25+
26+
Before powering up your Lilygo TTGO LoRa32, please make sure that the board is in good
27+
condition with no obvious signs of damage.
28+
29+
System requirements
30+
*******************
31+
32+
Prerequisites
33+
=============
34+
35+
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
36+
below to retrieve those files.
37+
38+
.. code-block:: console
39+
40+
west blobs fetch hal_espressif
41+
42+
.. note::
43+
44+
It is recommended running the command above after :file:`west update`.
45+
46+
Building & Flashing
47+
*******************
48+
49+
Simple boot
50+
===========
51+
52+
The board could be loaded using the single binary image, without 2nd stage bootloader.
53+
It is the default option when building the application without additional configuration.
54+
55+
.. note::
56+
57+
Simple boot does not provide any security features nor OTA updates.
58+
59+
MCUboot bootloader
60+
==================
61+
62+
User may choose to use MCUboot bootloader instead. In that case the bootloader
63+
must be built (and flashed) at least once.
64+
65+
There are two options to be used when building an application:
66+
67+
1. Sysbuild
68+
2. Manual build
69+
70+
.. note::
71+
72+
User can select the MCUboot bootloader by adding the following line
73+
to the board default configuration file.
74+
75+
.. code-block:: cfg
76+
77+
CONFIG_BOOTLOADER_MCUBOOT=y
78+
79+
Sysbuild
80+
========
81+
82+
The sysbuild makes possible to build and flash all necessary images needed to
83+
bootstrap the board with the ESP32-PICO-D4 SoC.
84+
85+
To build the sample application using sysbuild use the command:
86+
87+
.. zephyr-app-commands::
88+
:tool: west
89+
:zephyr-app: samples/hello_world
90+
:board: ttgo_lora32/esp32/procpu
91+
:goals: build
92+
:west-args: --sysbuild
93+
:compact:
94+
95+
By default, the ESP32-PICO-D4 sysbuild creates bootloader (MCUboot) and application
96+
images. But it can be configured to create other kind of images.
97+
98+
Build directory structure created by sysbuild is different from traditional
99+
Zephyr build. Output is structured by the domain subdirectories:
100+
101+
.. code-block::
102+
103+
build/
104+
├── hello_world
105+
│   └── zephyr
106+
│   ├── zephyr.elf
107+
│   └── zephyr.bin
108+
├── mcuboot
109+
│ └── zephyr
110+
│ ├── zephyr.elf
111+
│ └── zephyr.bin
112+
└── domains.yaml
113+
114+
.. note::
115+
116+
With ``--sysbuild`` option the bootloader will be re-build and re-flash
117+
every time the pristine build is used.
118+
119+
For more information about the system build please read the :ref:`sysbuild` documentation.
120+
121+
Manual build
122+
============
123+
124+
During the development cycle, it is intended to build & flash as quickly possible.
125+
For that reason, images can be built one at a time using traditional build.
126+
127+
The instructions following are relevant for both manual build and sysbuild.
128+
The only difference is the structure of the build directory.
129+
130+
.. note::
131+
132+
Remember that bootloader (MCUboot) needs to be flash at least once.
133+
134+
Build and flash applications as usual (see :ref:`build_an_application` and
135+
:ref:`application_run` for more details).
136+
137+
.. zephyr-app-commands::
138+
:zephyr-app: samples/hello_world
139+
:board: ttgo_lora32/esp32/procpu
140+
:goals: build
141+
142+
The usual ``flash`` target will work with the ``ttgo_lora32`` board target.
143+
Here is an example for the :zephyr:code-sample:`hello_world`
144+
application.
145+
146+
.. zephyr-app-commands::
147+
:zephyr-app: samples/hello_world
148+
:board: ttgo_lora32/esp32/procpu
149+
:goals: flash
150+
151+
The default baud rate for the Lilygo TTGO LoRa32 is set to 1500000bps. If experiencing issues when flashing,
152+
try using different values by using ``--esp-baud-rate <BAUD>`` option during
153+
``west flash`` (e.g. ``west flash --esp-baud-rate 115200``).
154+
155+
You can also open the serial monitor using the following command:
156+
157+
.. code-block:: shell
158+
159+
west espressif monitor
160+
161+
After the board has automatically reset and booted, you should see the following
162+
message in the monitor:
163+
164+
.. code-block:: console
165+
166+
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
167+
Hello World! ttgo_lora32
168+
169+
Code samples
170+
============
171+
172+
The following sample applications will work out of the box with this board:
173+
174+
* :zephyr:code-sample:`lora-send`
175+
* :zephyr:code-sample:`lora-receive`
176+
* :zephyr:code-sample:`fs`
177+
* :zephyr:code-sample:`character-frame-buffer`
178+
179+
Debugging
180+
*********
181+
182+
Lilygo TTGO LoRa32 debugging is not supported due to pinout limitations.
183+
184+
Related Documents
185+
*****************
186+
- `Lilygo TTGO LoRa32 schematic <https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/schematic/T3_V1.6.1.pdf>`_ (PDF)
187+
- `Lilygo TTGO LoRa32 documentation <https://www.lilygo.cc/products/lora3>`_
188+
- `Lilygo github repo <https://github.com/Xinyuan-LilyGo>`_
189+
- `ESP32-PICO-D4 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-pico-d4_datasheet_en.pdf>`_ (PDF)
190+
- `ESP32 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_ (PDF)
191+
- `ESP32 Hardware Reference <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/index.html>`_
192+
- `SX127x Datasheet <https://www.semtech.com/products/wireless-rf/lora-connect/sx1276#documentation>`_
193+
- `SSD1306 Datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf>`_ (PDF)

‎boards/lilygo/ttgo_t7v1_5/doc/index.rst

+12-33
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,25 @@ It features the following integrated components:
1313
- JST GH 2-pin battery connector
1414
- LED
1515

16-
Functional Description
17-
**********************
16+
Hardware
17+
********
18+
1819
This board is based on the ESP32-WROVER-E module with 4MB of flash (there
1920
are models 16MB as well), WiFi and BLE support. It has a Micro-USB port for
2021
programming and debugging, integrated battery charging and an on-board antenna.
2122

22-
Connections and IOs
23-
===================
23+
Supported Features
24+
==================
2425

25-
The ``ttgo_t7v1_5/esp32/procpu`` board target supports the following hardware features:
26-
27-
+-----------+------------+------------------+
28-
| Interface | Controller | Driver/Component |
29-
+===========+============+==================+
30-
| CPU | ESP32 | arch/xtensa |
31-
+-----------+------------+------------------+
32-
| GPIO | on-chip | gpio_esp32 |
33-
+-----------+------------+------------------+
34-
| UART | on-chip | uart_esp32 |
35-
+-----------+------------+------------------+
36-
| I2C | on-chip | i2c_esp32 |
37-
+-----------+------------+------------------+
38-
| SPI | on-chip | spi_esp32_spim |
39-
+-----------+------------+------------------+
40-
| LoRa | SX1276 | lora_sx127x |
41-
+-----------+------------+------------------+
42-
| WiFi | on-chip | wifi_esp32 |
43-
+-----------+------------+------------------+
44-
| BLE | on-chip | bluetooth_esp32 |
45-
+-----------+------------+------------------+
46-
| Flash | on-chip | flash_esp32 |
47-
+-----------+------------+------------------+
26+
.. zephyr:board-supported-hw::
4827
4928
System requirements
5029
*******************
5130

5231
Prerequisites
5332
=============
5433

55-
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
34+
Espressif HAL requires WiFi and Bluetooth binary blobs in order to work. Run the command
5635
below to retrieve those files.
5736

5837
.. code-block:: console
@@ -69,7 +48,7 @@ Building & Flashing
6948
Simple boot
7049
===========
7150

72-
The board could be loaded using the single binary image, without 2nd stage bootloader.
51+
The board could be loaded using a single binary image, without 2nd stage bootloader.
7352
It is the default option when building the application without additional configuration.
7453

7554
.. note::
@@ -80,7 +59,7 @@ MCUboot bootloader
8059
==================
8160

8261
User may choose to use MCUboot bootloader instead. In that case the bootloader
83-
must be build (and flash) at least once.
62+
must be built (and flash) at least once.
8463

8564
There are two options to be used when building an application:
8665

@@ -92,14 +71,14 @@ There are two options to be used when building an application:
9271
User can select the MCUboot bootloader by adding the following line
9372
to the board default configuration file.
9473

95-
.. code:: cfg
74+
.. code-block:: cfg
9675
9776
CONFIG_BOOTLOADER_MCUBOOT=y
9877
9978
Sysbuild
10079
========
10180

102-
The sysbuild makes possible to build and flash all necessary images needed to
81+
The sysbuild makes it possible to build and flash all necessary images needed to
10382
bootstrap the board with the ESP32 SoC.
10483

10584
To build the sample application using sysbuild use the command:
@@ -142,7 +121,7 @@ Manual build
142121
============
143122

144123
During the development cycle, it is intended to build & flash as quickly possible.
145-
For that reason, images can be build one at a time using traditional build.
124+
For that reason, images can be built one at a time using traditional build.
146125

147126
The instructions following are relevant for both manual build and sysbuild.
148127
The only difference is the structure of the build directory.

0 commit comments

Comments
 (0)