下载地址
https://www.silabs.com/documents/public/software/SimplicityCommander-Linux.zip
下载完之后解压缩,在压缩包内执行命令如下
tar jxvf Commander_linux_x86_64_1v15p0b1306.tar.bz
cd ./commander
./commander
添加到系统变量
sudo vim /etc/profile
将 Commander 路径添加添加到文件中的最后一行,在任何目录下,输入 commander 即可打开 Commander 工具
source /etc/profile
下载地址
https://www.segger.com/downloads/jlink/JLink_Linux_V788g_x86_64.deb
安装jlink
sudo dpkg -i JLink_Linux_V788g_x86_64.deb
下载地址:
https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz?rev=99a2bce6f4464be08eca01eda13e4e96&hash=C1BA53B2F16F00A518C5781098C2E56144EA3FCD
复制到matter文件夹,输入命令解压:
tar -xvf gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz
source ./scripts/activate.sh
gn gen out/host
ninja -C out/host chip-cert
使用方式参考
./out/host/chip-cert gen-att-cert --help
./out/host/chip-cert gen-cd -help
./out/host/chip-cert gen-att-cert --type i --subject-cn "Matter Test PAI" --subject-vid 1049 --valid-from "2023-1-15 14:30:00" --lifetime 4294967295 --ca-key credentials/test/attestation/Chip-Test-PAA-NoVID-Key.pem --ca-cert credentials/test/attestation/Chip-Test-PAA-NoVID-Cert.pem --out-key ./Silabs-Test-PAI-Key.pem --out ./SilabsTest-PAI-Cert.pem
cat SilabsTest-PAI-Cert.pem
cat Silabs-Test-PAI-Key.pem
生成Silabs-Test-CD.bin文件
./out/host/chip-cert gen-cd --cert ./credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem --key ./credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out ./Silabs-Test-CD.bin --format-version 1 --vendor-id 1049 --product-id 5555 --device-type-id 0016 --certificate-id "ZIG0000000000000001" --security-level 0 --security-info 0 --version-number 0005 --certification-type 0
cp ./Silabs-Test-* ./silabs_examples/credentials/
cd ./silabs_examples/credentials
export BASE_SDK_PATH=~/matter/third_party/silabs/gecko_sdk
export ARM_GCC_DIR=~/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi
修改“creds.py”文件
mcu_family = 'EFR32MG24'
execute('Flashing device app', [ "commander", "flash", device_bin, "--serialno", serial_num, "--device",mcu_family, ])
execute('Erasing Page', ["commander", "device", "pageerase", "--range", "{}:+{}".format(hex(page.address),page.size), "--serialno", serial_num, "--device", mcu_family, ])
execute('Flashing PAI', ["commander", "flash", _pai_der, "--binary", "--address", hex(page.address + pai_offset), "--serialno", serial_num, "--device", mcu_family, ])
execute('Flashing DAC', ["commander", "flash", _dac_der, "--binary", "--address", hex(page.address + dac_offset),"--serialno", serial_num, "--device", mcu_family, ])
execute('Flashing CD', ["commander", "flash", cd_file, "--binary", "--address", hex(page.address + cd_offset), "--serialno", serial_num, "--device", mcu_family, ])
# 第 143 行改为
subprocess.run(["commander", "readmem", "--range", "{}:+{}".format(hex(page.address), end_offset), "--serialno",serial_num, "--device", mcu_family])
DAC 证书的生成和 Matter 安全证书(DAC/PAI/CD)的烧录
python3 ./creds.py -p /dev/ttyUSB0 -S 69408690 -B brd2601b -N "Matter Test DAC 01" -V 4169 -P 21845 -C Silabs-Test-PAICert.pem -K Silabs-Test-PAI-Key.pem -D Silabs-Test-CD.bin