feat: Support choosing different config.json (#848)

This commit is contained in:
virgil
2025-06-26 02:55:45 +08:00
committed by GitHub
parent c17bd15baa
commit f1277934d1
4 changed files with 98 additions and 15 deletions

View File

@@ -1,24 +1,30 @@
# 编译配置命令
# 编译命令
**配置编译目标为 ESP32S3**
## 一键编译
```bash
python scripts/release.py sensecap-watcher
```
## 手动配置编译
```bash
idf.py set-target esp32s3
```
**打开 menuconfig**
**配置**
```bash
idf.py menuconfig
```
**选择板子**
选择板子
```
Xiaozhi Assistant -> Board Type -> SenseCAP Watcher
```
watcher 中一些额外的配置项如下需要menuconfig 选择 或者拷贝放入sdkconfig.defaults中.
watcher 中一些额外的配置项如下,需要menuconfig 选择.
```
CONFIG_BOARD_TYPE_SENSECAP_WATCHER=y
@@ -29,12 +35,13 @@ CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
```
**编译烧入:**
## 编译烧入
```bash
idf.py build flash
idf.py -DBOARD_NAME=sensecap-watcher build flash
```
注意: 请特别小心处理闪存固件分区地址,以避免错误擦除 SenseCAP Watcher 的自身设备信息EUI 等),否则设备可能无法正确连接到 SenseCraft 服务器!在刷写固件之前,请务必记录设备的相关必要信息,以确保有恢复的方法!
注意: 如果当前设备出货之前是SenseCAP 固件(非小智版本),请特别小心处理闪存固件分区地址,以避免错误擦除 SenseCAP Watcher 的自身设备信息EUI 等否则设备即使恢复成SenseCAP固件也无法正确连接到 SenseCraft 服务器!所以在刷写固件之前,请务必记录设备的相关必要信息,以确保有恢复的方法!
您可以使用以下命令备份生产信息

View File

@@ -0,0 +1,53 @@
# Build Instructions
## One-click Build
```bash
python scripts/release.py sensecap-watcher -c config_en.json
```
## Manual Configuration and Build
```bash
idf.py set-target esp32s3
```
**Configuration**
```bash
idf.py menuconfig
```
Select the board:
```
Xiaozhi Assistant -> Board Type -> SenseCAP Watcher
```
There are some additional configuration options for the watcher. Please select them in menuconfig:
```
CONFIG_BOARD_TYPE_SENSECAP_WATCHER=y
CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions/v1/32m.csv"
CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y
CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
CONFIG_LANGUAGE_EN_US=y
CONFIG_SR_WN_WN9_JARVIS_TTS=y
```
## Build and Flash
```bash
idf.py -DBOARD_NAME=sensecap-watcher-en build flash
```
Note: If your device was previously shipped with the SenseCAP firmware (not the Xiaozhi version), please be very careful with the flash partition addresses to avoid accidentally erasing the device information (such as EUI) of the SenseCAP Watcher. Otherwise, even if you restore the SenseCAP firmware, the device may not be able to connect to the SenseCraft server correctly! Therefore, before flashing the firmware, be sure to record the necessary device information to ensure you have a way to recover it!
You can use the following command to back up the factory information:
```bash
# Firstly backup the factory information partition which contains the credentials for connecting the SenseCraft server
esptool.py --chip esp32s3 --baud 2000000 --before default_reset --after hard_reset --no-stub read_flash 0x9000 204800 nvsfactory.bin
```

View File

@@ -0,0 +1,17 @@
{
"target": "esp32s3",
"builds": [
{
"name": "sensecap-watcher-en",
"sdkconfig_append": [
"CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y",
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v1/32m.csv\"",
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
"CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n",
"CONFIG_IDF_EXPERIMENTAL_FEATURES=y",
"CONFIG_LANGUAGE_EN_US=y",
"CONFIG_SR_WN_WN9_JARVIS_TTS=y"
]
}
]
}