Skip to content

Contributed by 沈夜, organized by Ai-Thinker

[Ai-WB2] Windows Development Environment Setup (Bouffalo SDK)

0x1: Setting Up the Build Environment and Obtaining the Code

  • Installation steps: <https://www.msys2.org/>
  • Open MSYS2 and install git by running: pacman -S git
  • Open MSYS2 and install make by running: pacman -S make

Download the latest: msys2-x86_64-20240727.exe The installer has a GUI and includes Chinese language support. Just choose an installation directory that contains no Chinese characters. It takes about 2 minutes.

Use the default network settings, and the download will proceed.

Download the SDK:

The official Bouffalo Lab download link wouldn't budge — I tried twice with the same result, so I switched to a mirror. Y:\code\bl602>git clone <https://gitee.com/bouffalolab/bl_iot_sdk.git>

Command: git clone <https://gitee.com/bouffalolab/bl_iot_sdk.git> 0x2: Configure System Environment Variables

Click the New button, set the variable name to MSYS2_PATH_TYPE and the variable value to inherit.

Click the Edit button, and set path to the SDK toolchain path as follows:

mys2: Y:\code\bl602\mys2\usr\bin SDK path: Y:\code\bl602\bl_iot_sdk\toolchain\riscv\MSYS\bin

Set the paths according to your own environment. This is for reference only. 0x3: Build the Project The default directory Y:\code\bl602\bl_iot_sdk\customer_app contains nothing but demos. I picked two at random and ran make — neither would compile. I checked — the file exists, but it reports that it cannot be found.

After going through the docs, I found that building is not done with make. Run .genromap

Not supported on Windows.

Open the genromap file; its content is as follows:

#!/bin/sh make CONFIG_CHIP_NAME=BL602 CONFIG_LINK_ROM=1 -j exit $?

Just copy the second line.

I tried it, and both compiled successfully. The board hasn't arrived yet, so I couldn't test flashing or anything else. Anyway, the environment is fully set up with one-click startup — no need to install any software or configure environment variables. Come on, folks, let's have fun with WB2 together!

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