由 沈夜 贡献,Ai-Thinker 进行整理
[Ai-WB2] 烧录与点灯
Ai-Thinker Ai-WB2 无线模块开发框架
基于 Bouffalolab bl_iot_sdk,支持基于 RISC-V 架构的 BL602 Wi-Fi/BLE 组合芯片和 BL70X Zigbee/BLE 芯片。
Linux 用户
步骤 1. 安装先决条件
为了使用 Ai-WB2 开发框架与 Ai-WB2 配合使用,您需要根据您的操作系统安装一些软件包。这个设置指南将帮助您在 Linux 和 macOS 系统上安装所有必要的软件。
Debian 或 Ubuntu
📜 点击展开:sudo apt install build-essenti
bash
sudo apt install build-essential python3 python3-pip git screenArch
📜 点击展开:sudo pacman -S base-devel pyth
bash
sudo pacman -S base-devel python python-pip git screen接下来,克隆 SDK 仓库:
📜 点击展开:git clone --recursive [https:/
bash
git clone --recursive [https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2.git](https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2.git)如果您在中国编码,建议克隆以下仓库:
📜 点击展开:git clone --recursive [https:/
bash
git clone --recursive [https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2](https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2)步骤 2. 修改权限
修改编译工具链的权限以启用可执行功能。
Darwin
📜 点击展开:cd toolchain/riscv/Darwin/
bash
cd toolchain/riscv/Darwin/
chmod755.shLinux
📜 点击展开:cd toolchain/riscv/Linux/
bash
cd toolchain/riscv/Linux/
chmod755.shMSYS
📜 点击展开:cd toolchain/riscv/MSYS/
bash
cd toolchain/riscv/MSYS/
chmod755.sh步骤 3. 编译
例如,运行 cd applications/get-started/helloworld 项目进行编译:
📜 点击展开:cd applications/get-started/he
bash
cd applications/get-started/helloworld
make -j8步骤 4. 下载
请连接您的 Ai-WB2 串口开发板,并根据提示按下 EN 按钮。
📜 点击展开:make flash p=/dev/ttyUSB0 b=92
bash
make flash p=/dev/ttyUSB0 b=921600步骤 5. 其他
此外,您可以使用以下命令查看帮助。
📜 点击展开:make help
bash
make help您的配置芯片名称为 Ai-Thinker Ai-WB2 Wi-Fi&BLE 模块。 欢迎使用 Ai-WB2 SDK 构建系统。make 目标:
make all- 构建应用程序和组件make clean- 删除所有应用程序组件输出make flash- 构建并下载固件make flash-only- 仅下载固件make eflash- 在擦除后使用闪存make erase_flash- 擦除闪存的所有内部内容make list-components- 列出项目中的所有组件make [component name]- 将组件构建为库 注意:擦除闪存后,您需要使用此命令下载它,但始终要按下 BURN 按钮,然后按下 EN 按钮,最后释放所有按键。
📜 点击展开:make eflash
bash
make eflash📜 点击展开完整代码
本次命令 make flash p=com4 b=921600

