[docs] Add family flashing guides

This commit is contained in:
Kuba Szczodrzyński
2022-07-11 12:03:28 +02:00
parent f9359679ad
commit b6008fc9bb
11 changed files with 107 additions and 18 deletions

View File

@@ -0,0 +1,40 @@
# Flashing - Beken 72xx
- [Flashing (Tuya manual)](https://developer.tuya.com/en/docs/iot/burn-and-authorize-wb-series-modules?id=Ka78f4pttsytd)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Downloading is done using UART. For best experience, you should have two USB<->UART adapters plugged in (for UART1 and UART2).
!!! hint
The adapter connected to UART1 (for uploading) can have RTS connected to chip's RESET or CEN - to provide auto-reset during uploading.
If you're not using auto-reset, you'll have to reset the chip manually when upload starts (you have 10 seconds to do that).
## Automatically - using PlatformIO (recommended)
LibreTuya has built-in firmware uploaders. Pressing `Upload` in PlatformIO IDE does all the work for you.
Although the default options work in most cases, it is recommended to configure your PIO project first:
```ini
[env:my_board]
# default baudrate for both UARTs
monitor_speed = 115200
# port connected to UART2
monitor_port = COM60
# port connected to UART1
upload_port = COM96
```
## Manually - using `uf2upload`
{%
include-markdown "../../flashing-uf2ota.md"
%}
## Manually - using raw binaries/BkWriter
A binary file named `bk7231t_app_0x011000.rbl` is generated in `.pio/build/my_board/`. This file can be flashed to offset 0x11000, using BkWriter or other flashing tool of choice (including SPI download or flashrom).
Keep in mind that BkWriter is an extremely buggy and broken tool, and simply does not work in most cases.

View File

@@ -0,0 +1,38 @@
# Flashing - Realtek AmebaZ
- [Flashing (Tuya manual)](https://developer.tuya.com/en/docs/iot/burn-and-authorize-wr-series-modules?id=Ka789pjc581u8)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
Downloading is done using UART. It is required to put the chip into download mode, prior to flashing. This can be done by resetting the chip, while pulling UART2_TX to GND. If successful, the chip should print few garbage characters every second.
## Automatically - using PlatformIO (recommended)
LibreTuya has built-in firmware uploaders. Pressing `Upload` in PlatformIO IDE does all the work for you.
If you have more than one COM port,configure your PIO project first:
```ini
[env:my_board]
monitor_port = COM60
upload_port = COM60
```
## Manually - using `uf2upload`
{%
include-markdown "../../flashing-uf2ota.md"
%}
## Manually - using raw binaries/BkWriter
There are two binary files in `.pio/build/my_board/`:
- `image_0x00B000.ota1.bin`
- `image_0x0D0000.ota2.bin`
They can be flashed using `ImageTool_v2.3.1_AmebaZ(8710b)`. Browse and select one of the files and enter an appropriate address. Select COM port, press `Open` and then `Download`.
This method is not recommended, as it requires you to know the currently enabled OTA index (1 or 2). Flashing the wrong file will either not make any changes, or upload firmware which won't run.
!!! hint
Because the UART uploading code is programmed in the ROM of the chip, it can't be software-bricked, even if you damage the bootloader.