From 9416e45a7571c3a3de1d49a59757372b350bcf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 31 Jul 2022 13:05:24 +0200 Subject: [PATCH] [docs] Restructure documentation, clarify some parts --- README.md | 2 +- SUMMARY.md | 50 ++++++++-------- docs/getting-started.md | 59 ------------------- docs/getting-started/README.md | 38 ++++++++++++ docs/getting-started/uploading.md | 6 ++ docs/ota/README.md | 2 +- docs/{flashing-uf2ota.md => ota/flashing.md} | 0 docs/platform/beken-72xx/flashing.md | 10 +++- docs/platform/realtek-ambz/flashing.md | 7 ++- docs/projects/esphome.md | 49 +++++++++++++++ docs/{ => reference}/config.md | 2 +- docs/{ => reference}/project-structure.md | 0 .../arduino.md} | 2 +- docs/{ => status}/supported.md | 2 +- docs/status/supported_boards.md | 32 ++++++++++ docs/{ => status}/supported_chips.md | 0 docs/{ => status}/supported_families.md | 0 .../unsupported_boards_tuya_all.md | 0 docs/supported_boards.md | 32 ---------- docs/update_docs.py | 12 ++-- 20 files changed, 178 insertions(+), 127 deletions(-) delete mode 100644 docs/getting-started.md create mode 100644 docs/getting-started/README.md create mode 100644 docs/getting-started/uploading.md rename docs/{flashing-uf2ota.md => ota/flashing.md} (100%) create mode 100644 docs/projects/esphome.md rename docs/{ => reference}/config.md (96%) rename docs/{ => reference}/project-structure.md (100%) rename docs/{implementation-status.md => status/arduino.md} (72%) rename docs/{ => status}/supported.md (90%) create mode 100644 docs/status/supported_boards.md rename docs/{ => status}/supported_chips.md (100%) rename docs/{ => status}/supported_families.md (100%) rename docs/{ => status}/unsupported_boards_tuya_all.md (100%) delete mode 100644 docs/supported_boards.md diff --git a/README.md b/README.md index 1184ee7..007daa7 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ LibreTuya also provides a common interface for all family implementations. The i ## Board List -See [Boards & CPU list](https://kuba2k2.github.io/libretuya/docs/supported/). +See [Boards & CPU list](https://kuba2k2.github.io/libretuya/docs/status/supported/). ## Arduino Core support status diff --git a/SUMMARY.md b/SUMMARY.md index 3c3208c..6da5d2f 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,10 +1,26 @@ * [Home](README.md) -* [Getting started](docs/getting-started.md) -* [💻 Boards & CPU list](docs/supported.md) -* [✔️ Implementation status](docs/implementation-status.md) -* [🔧 Configuration](docs/config.md) -* [📁 Project structure](docs/project-structure.md) -* 🔖 Code reference +* 😊 Getting started + * [Start here](docs/getting-started/README.md) + * [Uploading](docs/getting-started/uploading.md) + * [Options & config](docs/reference/config.md) + * [ESPHome port](docs/projects/esphome.md) +* [💻 Boards & CPU list](docs/status/supported.md) +* [✔️ Implementation status](docs/status/arduino.md) +* Supported chip families + * Beken BK72xx + * [General info](docs/platform/beken-72xx/README.md) + * [Flashing](docs/platform/beken-72xx/flashing.md) + * Realtek AmebaZ Series + * [General info](docs/platform/realtek/README.md) + * [Flashing (AmebaZ)](docs/platform/realtek-ambz/flashing.md) + * [Debugging](docs/platform/realtek/debugging.md) + * [Exception decoder](docs/platform/realtek/exception-decoder.md) + * C library + * [Built-in functions](docs/platform/realtek-ambz/stdlib.md) + * [Memory management](docs/platform/realtek-ambz/memory-management.md) + * [All supported boards](boards/) +* API & libraries + * [Options & config](docs/reference/config.md) * [LibreTuya API](docs/reference/lt-api.md) * [LT class reference](ltapi/class_libre_tuya.md) * [Common methods](ltapi/_libre_tuya_a_p_i_8h.md) @@ -38,22 +54,10 @@ * [Functions](ltapi/functions.md) * [Macros](ltapi/macros.md) * [File list](ltapi/files.md) -* [✈️ OTA format](docs/ota/README.md) - * [uf2ota.py tool](docs/ota/uf2ota.md) - * [uf2ota.h library](docs/ota/library.md) - * [uf2ota.h reference](ltapi/uf2ota_8h.md) -* Families - * Beken BK72xx - * [General info](docs/platform/beken-72xx/README.md) - * [Flashing](docs/platform/beken-72xx/flashing.md) - * Realtek AmebaZ Series - * [General info](docs/platform/realtek/README.md) - * [Flashing (AmebaZ)](docs/platform/realtek-ambz/flashing.md) - * [Debugging](docs/platform/realtek/debugging.md) - * [Exception decoder](docs/platform/realtek/exception-decoder.md) - * C library - * [Built-in functions](docs/platform/realtek-ambz/stdlib.md) - * [Memory management](docs/platform/realtek-ambz/memory-management.md) - * [All supported boards](boards/) + * [📁 Project structure](docs/reference/project-structure.md) + * [✈️ OTA format](docs/ota/README.md) + * [uf2ota.py tool](docs/ota/uf2ota.md) + * [uf2ota.h library](docs/ota/library.md) + * [uf2ota.h reference](ltapi/uf2ota_8h.md) * [📓 TODO](TODO.md) * [🔗 Resources](docs/resources.md) diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index 4c0d318..0000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,59 +0,0 @@ -# Getting started - -Using LibreTuya is simple, just like every other PlatformIO development platform. - -## For your own projects - -If you're developing your own embedded software, and want it to run on LibreTuya-supported chips, the installation is simple: - -1. [Install PlatformIO](https://platformio.org/platformio-ide) -2. `platformio platform install https://github.com/kuba2k2/libretuya` -3. Create a project, build it and upload to the chip - -## Community projects - -LibreTuya was developed with popular community projects in mind. Currently, unofficial ESPHome port is available (the PR will hopefully be merged into upstream at some point). - -### ESPHome - -Because ESPHome does not natively support running on non-ESP chips, you need to use a fork of the project. - -Assuming you have PlatformIO, git and Python installed: - -1. Open a terminal/cmd.exe, create `esphome` directory and `cd` into it. -2. `git clone https://github.com/kuba2k2/libretuya-esphome -b platform/libretuya` (you need the `platform/libretuya` branch) -3. Go to [Boards & CPU list](https://kuba2k2.github.io/libretuya/docs/supported/) and choose your board name. -4. Create a YAML config file for your device. You can either: - - use `python -m esphome wizard yourdevice.yml` - type answers to the six questions the wizard asks - - if your board isn't available in the wizard yet, use the manual YAML method below - - write a config file manually: - ```yaml - esphome: - name: yourdevice - - libretuya: - board: wr3 - - logger: - api: - password: "" - ota: - password: "" - - wifi: - ssid: "YourWiFiSSID" - password: "SecretPa$$w0rd" - ap: - ssid: "Yourdevice Fallback Hotspot" - password: "Dv2hZMGZRUvy" - ``` -5. Install LibreTuya: `platformio platform install https://github.com/kuba2k2/libretuya`. This step is necessary, as otherwise ESPHome will try to use a version from the registry, which is often outdated. -6. Edit the config file to use your installed LT version: - ```yaml - libretuya: - board: wr3 - framework: - version: latest - ``` -7. `python -m esphome compile yourdevice.yml` -8. The binary file, ready for uploading, is now in `.esphome/build/yourdevice/.pioenvs/yourdevice/`. Refer to your board README to find appropriate flashing instructions. diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md new file mode 100644 index 0000000..442768c --- /dev/null +++ b/docs/getting-started/README.md @@ -0,0 +1,38 @@ +# Getting started + +Using LibreTuya is simple, just like every other PlatformIO development platform. + +1. [Install PlatformIO](https://platformio.org/platformio-ide) +2. `platformio platform install https://github.com/kuba2k2/libretuya` + +## Board selection + +- Go to [Boards & CPU list](../status/supported.md). +- Find the board your device has (usually, the model number is written on the silkscreen). + - If your board isn't available yet, use one of the "Generic" boards that matches the CPU you have. +- Click on the board name. From the documentation page, note the board code. +- Use this code to create a PlatformIO project. + +## GPIO usage + +!!! important + This can be confusing at first, so make sure to read this part carefully to understand it. + + Input/output pin numbers in Arduino code (i.e. `digitalWrite()`) use Arduino pin numbers - for example `D1`, `D3`. This is the same as simply `1` or `3`, but it cannot be confused with CPU GPIO numbers. + + On the board pinout page, the purple blocks represent Arduino pins, while the dark red blocks refer to GPIO numbers. + + Projects like ESPHome also use Arduino pin numbering. + +## Develop your own project + +If you're developing your own embedded software, and want it to run on LibreTuya-supported chips, create a project. + +- use PlatformIO IDE (PIO Home -> Open -> New Project) +- run `pio project init` in your desired project directory + +Next, read [Uploading](uploading.md) guide to run your project! + +## Run community projects + +LibreTuya was developed with popular community projects in mind. Currently, unofficial [ESPHome port](../projects/esphome.md) is available ([the PR](https://github.com/esphome/esphome/pull/3509) will hopefully be merged into upstream at some point). diff --git a/docs/getting-started/uploading.md b/docs/getting-started/uploading.md new file mode 100644 index 0000000..8823b37 --- /dev/null +++ b/docs/getting-started/uploading.md @@ -0,0 +1,6 @@ +# Uploading + +The uploading/flashing procedure is different for every chip family: + +- BK72xx / BK7231 - [click here](../platform/beken-72xx/flashing.md) +- Realtek AmebaZ (RTL8710BN/BX) - [click here](../platform/realtek-ambz/flashing.md) diff --git a/docs/ota/README.md b/docs/ota/README.md index 1c3064e..ea1387f 100644 --- a/docs/ota/README.md +++ b/docs/ota/README.md @@ -29,7 +29,7 @@ For easier understanding, these update types will be referred to in this documen ## Custom family IDs {% - include-markdown "../supported_families.md" + include-markdown "../status/supported_families.md" %} ## Extension tags diff --git a/docs/flashing-uf2ota.md b/docs/ota/flashing.md similarity index 100% rename from docs/flashing-uf2ota.md rename to docs/ota/flashing.md diff --git a/docs/platform/beken-72xx/flashing.md b/docs/platform/beken-72xx/flashing.md index 73671dd..08f9cb5 100644 --- a/docs/platform/beken-72xx/flashing.md +++ b/docs/platform/beken-72xx/flashing.md @@ -10,6 +10,14 @@ Downloading is done using UART. For best experience, you should have two USB<->U 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). +- UART1 is used for uploading the code. This adapter will be used by PlatformIO. +- UART2 allows for log output. You can have a terminal session continuously open on this adapter. + +!!! hint + If you only have a single adapter, or just want to use the UART1 (upload) port only, you can change the logging port. + + Refer to [Options & config](../../reference/config.md) (`Serial output` section). Set `LT_UART_DEFAULT_PORT` to `1`, which will use UART1 for all output. + ## Automatically - using PlatformIO (recommended) LibreTuya has built-in firmware uploaders. Pressing `Upload` in PlatformIO IDE does all the work for you. @@ -30,7 +38,7 @@ upload_port = COM96 ## Manually - using `uf2upload` {% - include-markdown "../../flashing-uf2ota.md" + include-markdown "../../ota/flashing.md" %} ## Manually - using raw binaries/BkWriter diff --git a/docs/platform/realtek-ambz/flashing.md b/docs/platform/realtek-ambz/flashing.md index 558324c..23b4023 100644 --- a/docs/platform/realtek-ambz/flashing.md +++ b/docs/platform/realtek-ambz/flashing.md @@ -3,7 +3,10 @@ - [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. +Downloading is done using UART2 (sometimes called Log_UART). Refer to your board documentation to find the correct pins. + +!!! important + 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) @@ -20,7 +23,7 @@ upload_port = COM60 ## Manually - using `uf2upload` {% - include-markdown "../../flashing-uf2ota.md" + include-markdown "../../ota/flashing.md" %} ## Manually - using raw binaries/BkWriter diff --git a/docs/projects/esphome.md b/docs/projects/esphome.md new file mode 100644 index 0000000..7f8ac77 --- /dev/null +++ b/docs/projects/esphome.md @@ -0,0 +1,49 @@ +# ESPHome + +!!! note + Read [Getting started](../getting-started/README.md) first. + +Because ESPHome does not natively support running on non-ESP chips, you need to use a fork of the project. + +Assuming you have PlatformIO, git and Python installed: + +1. Open a terminal/cmd.exe, create `esphome` directory and `cd` into it. +2. `git clone https://github.com/kuba2k2/libretuya-esphome -b platform/libretuya` (you need the `platform/libretuya` branch) +3. Go to [Boards & CPU list](https://kuba2k2.github.io/libretuya/docs/supported/), click on your board and remember your board code. +4. Create a YAML config file for your device. You can either: + - use `python -m esphome wizard yourdevice.yml` - type answers to the six questions the wizard asks + - if your board isn't available in the wizard yet, use the manual YAML method below + - write a config file manually: + ```yaml + esphome: + name: yourdevice + + libretuya: + board: wr3 # THIS IS YOUR BOARD CODE + framework: + version: latest + + logger: + api: + password: "" + ota: + password: "" + + wifi: + ssid: "YourWiFiSSID" + password: "SecretPa$$w0rd" + ap: + ssid: "Yourdevice Fallback Hotspot" + password: "Dv2hZMGZRUvy" + ``` +5. Compile and upload ESPHome: + - `python -m esphome compile yourdevice.yml` - this will only compile the code + - `python -m esphome upload yourdevice.yml` - this will upload the previously compiled code + - `python -m esphome run yourdevice.yml` - this will compile and upload the code + +!!! info + If you want to flash manually: + + The binary file, ready for uploading, will be in `.esphome/build/yourdevice/.pioenvs/yourdevice/`. + + Refer to your board README to find appropriate flashing instructions. diff --git a/docs/config.md b/docs/reference/config.md similarity index 96% rename from docs/config.md rename to docs/reference/config.md index 5580d7c..88ae957 100644 --- a/docs/config.md +++ b/docs/reference/config.md @@ -15,7 +15,7 @@ custom_fw_version = 1.2.0 ## LibreTuya options !!! note - See [LibreTuyaConfig.h](../ltapi/_libre_tuya_config_8h_source.md) for most options and their defaults. + See [LibreTuyaConfig.h](../../ltapi/_libre_tuya_config_8h_source.md) for most options and their defaults. All options are configurable via C++ defines in PlatformIO project file. For example: ```ini diff --git a/docs/project-structure.md b/docs/reference/project-structure.md similarity index 100% rename from docs/project-structure.md rename to docs/reference/project-structure.md diff --git a/docs/implementation-status.md b/docs/status/arduino.md similarity index 72% rename from docs/implementation-status.md rename to docs/status/arduino.md index 9ceba0f..43602d6 100644 --- a/docs/implementation-status.md +++ b/docs/status/arduino.md @@ -1,7 +1,7 @@ # Implementation status {% - include-markdown "../README.md" + include-markdown "../../README.md" start="\n## Arduino Core support status\n" end="\n## License\n" %} diff --git a/docs/supported.md b/docs/status/supported.md similarity index 90% rename from docs/supported.md rename to docs/status/supported.md index b4c915d..d831d8f 100644 --- a/docs/supported.md +++ b/docs/status/supported.md @@ -26,7 +26,7 @@ A list of chip families currently supported by this project. !!! note The term *family* was chosen over *platform*, in order to reduce possible confusion between LibreTuya supported "platforms" and PlatformIO's "platform", as an entire package. *Family* is also more compatible with the UF2 term. -The following list corresponds to UF2 OTA format family names, and is also [available as JSON](../families.json). The IDs are also present in [ChipType.h](../ltapi/_chip_type_8h_source.md). +The following list corresponds to UF2 OTA format family names, and is also [available as JSON](../../families.json). The IDs are also present in [ChipType.h](../../ltapi/_chip_type_8h_source.md). {% include-markdown "supported_families.md" diff --git a/docs/status/supported_boards.md b/docs/status/supported_boards.md new file mode 100644 index 0000000..b890e5e --- /dev/null +++ b/docs/status/supported_boards.md @@ -0,0 +1,32 @@ + + +Name | MCU | Flash | RAM | Pins* | Wi-Fi | BLE | ZigBee | Family name +--------------------------------------------------------------------------|-----------|-------|---------|-------------|-------|-----|--------|---------------- +**Generic** | | | | | | | | +[BK7231N (Tuya QFN32)](../../boards/generic-bk7231n-qfn32-tuya/README.md) | BK7231N | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` +[BK7231T (Tuya QFN32)](../../boards/generic-bk7231t-qfn32-tuya/README.md) | BK7231T | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[RTL8710BN (2M/468k)](../../boards/generic-rtl8710bn-2mb-468k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[RTL8710BN (2M/788k)](../../boards/generic-rtl8710bn-2mb-788k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[RTL8720CF (2M/992k)](../../boards/generic-rtl8720cf-2mb-992k/README.md) | RTL8720CF | 2 MiB | 256 KiB | 20 (20 I/O) | ✔️ | ✔️ | ❌ | `realtek-ambz2` +**Ai-Thinker Co., Ltd.** | | | | | | | | +[BW12](../../boards/bw12/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[BW15](../../boards/bw15/README.md) | RTL8720CF | 2 MiB | 256 KiB | 16 (13 I/O) | ✔️ | ✔️ | ❌ | `realtek-ambz2` +**Tuya Inc.** | | | | | | | | +[CB2S](../../boards/cb2s/README.md) | BK7231N | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` +[WB2L](../../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WB2S](../../boards/wb2s/README.md) | BK7231T | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WB3L](../../boards/wb3l/README.md) | BK7231T | 2 MiB | 256 KiB | 21 (17 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WB3S](../../boards/wb3s/README.md) | BK7231T | 2 MiB | 256 KiB | 22 (16 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WR2](../../boards/wr2/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR2E](../../boards/wr2e/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR3](../../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR3E](../../boards/wr3e/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR3N](../../boards/wr3n/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (10 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR2L](../../boards/wr2l/README.md) | RTL8710BX | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR2LE](../../boards/wr2le/README.md) | RTL8710BX | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR3L](../../boards/wr3l/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +[WR3LE](../../boards/wr3le/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +**Unknown** | | | | | | | | +[LSC LMA35](../../boards/lsc-lma35/README.md) | BK7231N | 2 MiB | 256 KiB | 22 (15 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` +**N/A** | | | | | | | | +[Native](../../boards/generic-native/README.md) | NATIVE | 4 MiB | 4 MiB | - | ✔️ | ❌ | ❌ | `host-native` diff --git a/docs/supported_chips.md b/docs/status/supported_chips.md similarity index 100% rename from docs/supported_chips.md rename to docs/status/supported_chips.md diff --git a/docs/supported_families.md b/docs/status/supported_families.md similarity index 100% rename from docs/supported_families.md rename to docs/status/supported_families.md diff --git a/docs/unsupported_boards_tuya_all.md b/docs/status/unsupported_boards_tuya_all.md similarity index 100% rename from docs/unsupported_boards_tuya_all.md rename to docs/status/unsupported_boards_tuya_all.md diff --git a/docs/supported_boards.md b/docs/supported_boards.md deleted file mode 100644 index 7574fad..0000000 --- a/docs/supported_boards.md +++ /dev/null @@ -1,32 +0,0 @@ - - -Name | MCU | Flash | RAM | Pins* | Wi-Fi | BLE | ZigBee | Family name ------------------------------------------------------------------------|-----------|-------|---------|-------------|-------|-----|--------|---------------- -**Generic** | | | | | | | | -[BK7231N (Tuya QFN32)](../boards/generic-bk7231n-qfn32-tuya/README.md) | BK7231N | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` -[BK7231T (Tuya QFN32)](../boards/generic-bk7231t-qfn32-tuya/README.md) | BK7231T | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[RTL8710BN (2M/468k)](../boards/generic-rtl8710bn-2mb-468k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[RTL8710BN (2M/788k)](../boards/generic-rtl8710bn-2mb-788k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[RTL8720CF (2M/992k)](../boards/generic-rtl8720cf-2mb-992k/README.md) | RTL8720CF | 2 MiB | 256 KiB | 20 (20 I/O) | ✔️ | ✔️ | ❌ | `realtek-ambz2` -**Ai-Thinker Co., Ltd.** | | | | | | | | -[BW12](../boards/bw12/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[BW15](../boards/bw15/README.md) | RTL8720CF | 2 MiB | 256 KiB | 16 (13 I/O) | ✔️ | ✔️ | ❌ | `realtek-ambz2` -**Tuya Inc.** | | | | | | | | -[CB2S](../boards/cb2s/README.md) | BK7231N | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` -[WB2L](../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB2S](../boards/wb2s/README.md) | BK7231T | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB3L](../boards/wb3l/README.md) | BK7231T | 2 MiB | 256 KiB | 21 (17 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB3S](../boards/wb3s/README.md) | BK7231T | 2 MiB | 256 KiB | 22 (16 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WR2](../boards/wr2/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR2E](../boards/wr2e/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR3](../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR3E](../boards/wr3e/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR3N](../boards/wr3n/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (10 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR2L](../boards/wr2l/README.md) | RTL8710BX | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR2LE](../boards/wr2le/README.md) | RTL8710BX | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR3L](../boards/wr3l/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -[WR3LE](../boards/wr3le/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -**Unknown** | | | | | | | | -[LSC LMA35](../boards/lsc-lma35/README.md) | BK7231N | 2 MiB | 256 KiB | 22 (15 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` -**N/A** | | | | | | | | -[Native](../boards/generic-native/README.md) | NATIVE | 4 MiB | 4 MiB | - | ✔️ | ❌ | ❌ | `host-native` diff --git a/docs/update_docs.py b/docs/update_docs.py index 498392b..2857ab2 100644 --- a/docs/update_docs.py +++ b/docs/update_docs.py @@ -20,6 +20,8 @@ from tools.util.platform import ( get_family, ) +OUTPUT = join(dirname(__file__), "status") + def load_boards() -> Dict[str, dict]: return {board: get_board_manifest(board) for board in get_board_list()} @@ -126,13 +128,13 @@ def get_board_symbol(board_name: str, board: dict) -> str: def write_chips(mcus: List[str]): - md = Markdown(dirname(__file__), "supported_chips") + md = Markdown(OUTPUT, "supported_chips") md.add_list(*mcus) md.write() def write_boards(boards: List[Tuple[str, dict]]): - md = Markdown(dirname(__file__), "supported_boards") + md = Markdown(OUTPUT, "supported_boards") header = [ "Name", "MCU", @@ -164,7 +166,7 @@ def write_boards(boards: List[Tuple[str, dict]]): pins = f"{pins_total} ({pins_io} I/O)" # format row values symbol = get_board_symbol(board_name, board) - board_url = f"[{symbol}](../boards/{board_name}/README.md)" + board_url = f"[{symbol}](../../boards/{board_name}/README.md)" row = [ board_url, get(board, "build.mcu").upper(), @@ -186,7 +188,7 @@ def write_unsupported_boards( name: str, supported: List[str], ): - md = Markdown(dirname(__file__), name) + md = Markdown(OUTPUT, name) header = [ "Name", "MCU", @@ -223,7 +225,7 @@ def write_unsupported_boards( def write_families(): - md = Markdown(dirname(__file__), "supported_families") + md = Markdown(OUTPUT, "supported_families") header = [ "Title", "Name (parent)",