[i=s] 本帖最后由 hdydy 于 2025-5-4 19:12 编辑 [/i]
bl602搭建Matter环境,可能需要科学上网,有条件的可以试一试
安装WSL2
https://learn.microsoft.com/zh-cn/windows/wsl/install
https://documentation.ubuntu.com/wsl/en/stable/howto/install-ubuntu-wsl2/

安装git
sudo apt install git
安装python环境
miniconda:https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
conda create -n py312 python==3.12.4
conda activate py312
获取Matter源码
git clone --depth=1 https://github.com/project-chip/connectedhomeip.git
获取所需的子模块
cd connectedhomeip
./scripts/checkout_submodules.py --shallow --recursive --platform bouffalolab

安装toolchain
./integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh
toolchain默认安装到 /opt/bouffalolab_sdk
,也可自己指定,编译的时候需要这个路径
export BOUFFALOLAB_SDK_ROOT=/opt/bouffalolab_sdk
安装Matter编译环境,这个步骤会下载CIPD安装包,可能需要科学上网。试了好几次才成功。可在 .environment/cipd/packages.log
中查看下载进度
source scripts/activate.sh -p bouffalolab





查看内置例程
./scripts/build/build_examples.py targets | grep bouffalolab

编译例程
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-wifi-littlefs build


编译输出目录 out/bouffalolab-bl602dk-light-wifi-littlefs

参考链接
https://project-chip.github.io/connectedhomeip-doc/platforms/bouffalolab/getting_started.html