diff --git a/docs/flashing/SUMMARY.md b/docs/flashing/SUMMARY.md index 76cefbc..332d425 100644 --- a/docs/flashing/SUMMARY.md +++ b/docs/flashing/SUMMARY.md @@ -2,9 +2,9 @@ * [Flashing PlatformIO projects](platformio.md) * [Flashing ESPHome](esphome.md) -* [Using ltchiptool GUI](ltchiptool.md) -* [Converting with tuya-cloudcutter](cloudcutter.md) -* Chip connection guide +* [Using ltchiptool GUI](tools/ltchiptool.md) +* [Converting with tuya-cloudcutter](tools/cloudcutter.md) +* 🔌 Chip connection guide * [Beken BK72xx](../platform/beken-72xx/flashing.md) * [Realtek RTL8710Bx](../platform/realtek-ambz/flashing.md) -* [Auto-download-reboot](adr.md) +* [Auto-download-reboot](tools/adr.md) diff --git a/docs/flashing/esphome.md b/docs/flashing/esphome.md index 92e0e7f..64a341b 100644 --- a/docs/flashing/esphome.md +++ b/docs/flashing/esphome.md @@ -2,6 +2,11 @@ ESPHome can be flashed in few different ways, depending on your needs. +!!! abstract + All binary files generated by ESPHome will be in `.esphome/build//.pioenvs//`. The methods described below may require you to get a file from that directory. + + This path will be referred to as **build directory**. + ## Built-in flasher The flasher program built-in LibreTuya is also available for ESPHome. @@ -15,13 +20,6 @@ The flasher program built-in LibreTuya is also available for ESPHome. If your device is already running ESPHome, refer to the OTA guide below. -## Other methods - -!!! abstract - All binary files generated by ESPHome will be in `.esphome/build//.pioenvs//`. The methods described below may require you to get a file from that directory. - - This path will be referred to as **build directory**. - ## Over-the-Air (OTA) This method requires having ESPHome already installed on your device. diff --git a/docs/flashing/inc/ota-cloudcutter.md b/docs/flashing/inc/ota-cloudcutter.md index d78b0be..b99b7a8 100644 --- a/docs/flashing/inc/ota-cloudcutter.md +++ b/docs/flashing/inc/ota-cloudcutter.md @@ -5,4 +5,4 @@ Grab the `bk7231x_app.ota.ug.bin` file from the build directory - take care to choose the correct file. It must have "OTA" and "UG" in its name. -Next, refer to [Using tuya-cloudcutter](../cloudcutter.md) guide. +Next, refer to [Using tuya-cloudcutter](../tools/cloudcutter.md) guide. diff --git a/docs/flashing/inc/uart-ltchiptool.md b/docs/flashing/inc/uart-ltchiptool.md index 22215e1..c05bc60 100644 --- a/docs/flashing/inc/uart-ltchiptool.md +++ b/docs/flashing/inc/uart-ltchiptool.md @@ -1,6 +1,6 @@ ## Using ltchiptool (wired, via UART) -You can use the [ltchiptool](https://github.com/libretuya/ltchiptool) GUI or CLI to manually flash the firmware. Grab the `firmware.uf2` file from the build directory. Then, follow the [ltchiptool usage guide](../ltchiptool.md) to flash it to the device. +You can use the [ltchiptool](https://github.com/libretuya/ltchiptool) GUI or CLI to manually flash the firmware. Grab the `firmware.uf2` file from the build directory. Then, follow the [ltchiptool usage guide](../tools/ltchiptool.md) to flash it to the device. !!! tip The UF2 file may have a different name, depending on the project you're building. Usually it's best to grab the latest (sorted by date) file with UF2 extension from the build directory. diff --git a/docs/flashing/platformio.md b/docs/flashing/platformio.md index b6defad..c3f3763 100644 --- a/docs/flashing/platformio.md +++ b/docs/flashing/platformio.md @@ -2,9 +2,14 @@ PlatformIO projects developed with LibreTuya can be flashed just like any other PIO project. +!!! abstract + All binary files generated by PlatformIO will be in `.pio/build//`. The methods described below may require you to get a file from that directory. + + This path will be referred to as **build directory**. + ## Built-in flasher -LibreTuya has a built-in firmware uploader, based on [ltchiptool](ltchiptool.md). Pressing `Upload` in PlatformIO IDE does all the work for you. +LibreTuya has a built-in firmware uploader, based on [ltchiptool](tool/ltchiptool.md). Pressing `Upload` in PlatformIO IDE does all the work for you. If you have more than one COM port, configure your PIO project first: @@ -18,13 +23,6 @@ upload_port = COM96 include-markdown "inc/uart-info.md" %} -## Other methods - -!!! abstract - All binary files generated by PlatformIO will be in `.pio/build//`. The methods described below may require you to get a file from that directory. - - This path will be referred to as **build directory**. - {% include-markdown "inc/uart-ltchiptool.md" %} diff --git a/docs/flashing/adr.md b/docs/flashing/tools/adr.md similarity index 100% rename from docs/flashing/adr.md rename to docs/flashing/tools/adr.md diff --git a/docs/flashing/cloudcutter.md b/docs/flashing/tools/cloudcutter.md similarity index 96% rename from docs/flashing/cloudcutter.md rename to docs/flashing/tools/cloudcutter.md index f41af69..87969d4 100644 --- a/docs/flashing/cloudcutter.md +++ b/docs/flashing/tools/cloudcutter.md @@ -22,7 +22,7 @@ If your device doesn't have a profile yet, it will probably not work. You can co ### Firmware building -1. [Compile ESPHome](../projects/esphome.md), or your custom firmware based on LibreTuya. +1. [Compile ESPHome](../../projects/esphome.md), or your custom firmware based on LibreTuya. 2. Get the firmware binary, named `bk7231x_app.ota.ug.bin` from the build directory (`.pio/build//` or `.esphome/build//.pioenvs//`). 3. Put it in the `custom-firmware` directory of tuya-cloudcutter. diff --git a/docs/flashing/ltchiptool.md b/docs/flashing/tools/ltchiptool.md similarity index 100% rename from docs/flashing/ltchiptool.md rename to docs/flashing/tools/ltchiptool.md diff --git a/docs/platform/beken-72xx/flashing.md b/docs/platform/beken-72xx/flashing.md index 757e43b..ea9ebf7 100644 --- a/docs/platform/beken-72xx/flashing.md +++ b/docs/platform/beken-72xx/flashing.md @@ -5,7 +5,7 @@ Downloading is done using UART. For best experience, you should have two USB<->U - One for flashing, preferably a real FT232RL or a good alternative. This connects to UART1 of the chip. - One for log output - BK72xx outputs messages on a separate port. You can have a terminal session continuously open on this adapter. This connects to UART2 of the chip - but it's not necessary for flashing. -**Read [Using ltchiptool](../../flashing/ltchiptool.md) to learn the flashing procedure** +**Read [Using ltchiptool](../../flashing/tools/ltchiptool.md) to learn the flashing procedure** !!! success "Wiring" Connect UART1 of the BK7231 to the USB-TTL adapter: @@ -36,7 +36,7 @@ Note that the download mode can only be activated when the flasher is running (t ## Auto-download-reboot -If you have a recent version of LibreTuya installed on the chip, you can use [Auto-download-reboot](../../flashing/adr.md) to reboot the chip automatically. This is enabled by default, so you don't have to change anything. +If you have a recent version of LibreTuya installed on the chip, you can use [Auto-download-reboot](../../flashing/tools/adr.md) to reboot the chip automatically. This is enabled by default, so you don't have to change anything. ## Single-adapter usage diff --git a/docs/platform/realtek-ambz/flashing.md b/docs/platform/realtek-ambz/flashing.md index 7beddbc..74358dd 100644 --- a/docs/platform/realtek-ambz/flashing.md +++ b/docs/platform/realtek-ambz/flashing.md @@ -2,7 +2,7 @@ Downloading is done using UART2 (sometimes called Log_UART). Refer to your board documentation to find the correct pins. You need a good USB<->UART adapter (preferably a real FT232RL) for the process. -**Read [Using ltchiptool](../../flashing/ltchiptool.md) to learn the flashing procedure** +**Read [Using ltchiptool](../../flashing/tools/ltchiptool.md) to learn the flashing procedure** !!! success "Wiring" Connect UART2 of the Realtek chip to the USB-TTL adapter: diff --git a/docs/reference/config.md b/docs/reference/config.md index 1eaafb1..af5f7ef 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -96,7 +96,7 @@ Options for controlling default UART log output. - `LT_USE_TIME` (0) - enables implementation of `gettimeofday()` and `settimeofday()`; checks for `millis()` overflows periodically - `LT_MICROS_HIGH_RES` (1) - count runtime microseconds using a high-resolution timer; disable if your application doesn't need `micros()` -- `LT_AUTO_DOWNLOAD_REBOOT` (1) - automatically reboot into "download mode" after detecting a flashing protocol command; [read more](../flashing/adr.md) +- `LT_AUTO_DOWNLOAD_REBOOT` (1) - automatically reboot into "download mode" after detecting a flashing protocol command; [read more](../flashing/tools/adr.md) ### Family feature config