From db5bf4fc464590e104e5a21e2fc871363d6f8bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sat, 10 Sep 2022 18:24:10 +0200 Subject: [PATCH] [docs] Add dumping instructions --- SUMMARY.md | 2 ++ docs/platform/beken-72xx/dumping.md | 20 ++++++++++++++++++++ docs/platform/realtek-ambz/dumping.md | 15 +++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 docs/platform/beken-72xx/dumping.md create mode 100644 docs/platform/realtek-ambz/dumping.md diff --git a/SUMMARY.md b/SUMMARY.md index 393478c..59018e9 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -13,9 +13,11 @@ * Beken BK72xx * [General info](docs/platform/beken-72xx/README.md) * [Flashing](docs/platform/beken-72xx/flashing.md) + * [Dumping](docs/platform/beken-72xx/dumping.md) * Realtek AmebaZ Series * [General info](docs/platform/realtek/README.md) * [Flashing (AmebaZ)](docs/platform/realtek-ambz/flashing.md) + * [Dumping (AmebaZ)](docs/platform/realtek-ambz/dumping.md) * [Debugging](docs/platform/realtek/debugging.md) * [Exception decoder](docs/platform/realtek/exception-decoder.md) * C library diff --git a/docs/platform/beken-72xx/dumping.md b/docs/platform/beken-72xx/dumping.md new file mode 100644 index 0000000..3c33571 --- /dev/null +++ b/docs/platform/beken-72xx/dumping.md @@ -0,0 +1,20 @@ +# Dumping - Beken 72xx + +- [bk7231tools](https://github.com/notkmhn/bk7231tools) + +## Dumping firmware + +Dumping is also done using UART (TX1/RX1). + +- Connect power to the board: GND and 3V3 (from your UART adapter or a higher-powered source). +- Connect an USB<->UART adapter to the chip: RX->TX1, TX->RX1. +- Install Python and Git. +- Clone bk7231tools: `git clone https://github.com/notkmhn/bk7231tools` +- `cd bk7231tools` +- Run dumping: `python bk7231tools.py read_flash -d COM96 -b 230400 -s 0 -c 512 dump.bin`. Change the port (`-p`) and baudrate (`-b`) if you want. + !!! note + The `--no-verify-checksum` is not required on BK7231N in latest versions of `bk7231tools`, despite the readme saying otherwise. + It's advised to run without that option, to make sure the dump is valid. +- You have 10 seconds to reset the chip (pull CEN to GND, or power-cycle the board) after running the command. The program will then begin dumping. + !!! note + If you need, you can increase the linking timeout using `--timeout` parameter. diff --git a/docs/platform/realtek-ambz/dumping.md b/docs/platform/realtek-ambz/dumping.md new file mode 100644 index 0000000..adca5d6 --- /dev/null +++ b/docs/platform/realtek-ambz/dumping.md @@ -0,0 +1,15 @@ +# Dumping - Beken 72xx + +- [rtltool.py](https://github.com/libretuya/ltchiptool/blob/master/ltchiptool/soc/ambz/util/rtltool.py) + +## Dumping firmware + +Dumping is also done using UART (TX2/RX2; Log_UART). + +- Connect power to the board: GND and 3V3 (from your UART adapter or a higher-powered source). +- Connect an USB<->UART adapter to the chip: RX->TX1, TX->RX1. +- Put the chip into download mode: reset the chip, while pulling UART2_TX to GND. If successful, the chip should print few garbage characters every second. +- Disconnect TX from GND after powering up the board. +- Install Python. +- Grab `rtltool.py` from the link above. +- Run dumping: `python rtltool.py -p COM60 rf 0 0x200000 dump.bin`. Change the port (`-p`) to your adapter's port.