Skip to content

Contributed by Shenye, organized by Ai-Thinker

[Ai-WB2] Flashing and LED Blinking

Ai-Thinker Ai-WB2 Wireless Module Development Framework

Based on the Bouffalolab bl_iot_sdk, it supports the RISC-V based BL602 Wi-Fi/BLE combo chip and the BL70X Zigbee/BLE chip.

Linux Users

Step 1. Install Prerequisites

To use the Ai-WB2 development framework with the Ai-WB2, you need to install some packages depending on your operating system. This setup guide will help you install all the necessary software on Linux and macOS systems.

Debian or Ubuntu

Click to expand: sudo apt install build-essenti
bash
sudo apt install build-essential python3 python3-pip git screen

Arch

Click to expand: sudo pacman -S base-devel pyth
bash
sudo pacman -S base-devel python python-pip git screen

Next, clone the SDK repository:

Click to expand: 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)

If you are coding in China, it is recommended to clone the following repository:

Click to expand: 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)

Step 2. Modify Permissions

Modify the permissions of the build toolchain to enable executable functionality.

Darwin

Click to expand: cd toolchain/riscv/Darwin/
bash
cd toolchain/riscv/Darwin/
chmod755.sh

Linux

Click to expand: cd toolchain/riscv/Linux/
bash
cd toolchain/riscv/Linux/
chmod755.sh

MSYS

Click to expand: cd toolchain/riscv/MSYS/
bash
cd toolchain/riscv/MSYS/
chmod755.sh

Step 3. Build

For example, run the cd applications/get-started/helloworld project to build:

Click to expand: cd applications/get-started/he
bash
cd applications/get-started/helloworld
make -j8

Step 4. Download

Please connect your Ai-WB2 serial development board and press the EN button as prompted.

Click to expand: make flash p=/dev/ttyUSB0 b=92
bash
make flash p=/dev/ttyUSB0 b=921600

Step 5. Others

Additionally, you can use the following command to view the help.

Click to expand: make help
bash
make help

Your configured chip name is the Ai-Thinker Ai-WB2 Wi-Fi&BLE module. Welcome to the Ai-WB2 SDK build system. make targets:

  • make all - Build the application and components
  • make clean - Delete all application component outputs
  • make flash - Build and flash firmware
  • make flash-only - Flash firmware only
  • make eflash - Use flash after erasing
  • make erase_flash - Erase all internal contents of the flash
  • make list-components - List all components in the project
  • make [component name] - Build the component as a library Note: after erasing the flash, you need to use this command to download it, but always press the BURN button, then press the EN button, and finally release all buttons.
Click to expand: make eflash
bash
make eflash
Click to expand full code
本次命令 make flash p=com4 b=921600

5498fa2a0762a68c682d47f41adeb1d.jpg

Released under the MIT License. Build Time 2026-09-11 14:52:23