Contributed by OldNewman, organized by Ai-Thinker
[AI-WB2-32S-Kit Review] 01 Setting Up the Development Environment
Introduction
Before getting started, I browsed the forum posts about environment setup and my heart sank. When applying, I had only thought that developing applications wouldn't be hard — I never expected so many difficulties in setting up the environment alone.
After some tinkering, I tried:
- Windows Git bash -- Failed
- Raspberry Pi 5 -- Failed
- Build on Linux, flash on Windows -- Succeeded
- Windows MSYS2 -- Succeeded
Setting Up the Development Environment -- Windows Git Bash -- Failed
My computer already had a make environment configured — I had previously got the CMake+GCC build workflow running. Since the AI-WB2-32S-Kit builds with make, I thought it wouldn't be much different, so I just downloaded the SDK and tried to build. Too naive. It didn't work.
Repository: https://github.com/Ai-Thinker-Open/Ai-Thinker-WB2
Cloned it.

Launched Git Bash, went into applications/get-started/helloworld, ran make to build — it errored out.
I noticed the Makefile has a section configuring BL60X_SDK_PATH, and wondered whether configuring it directly via environment variables would fix the problem.
Even after adding BL60X_SDK_PATH to the environment variables, it still errored (there were many different errors, so I didn't screenshot each one). Since I didn't want to install Eclipse, MSYS, and such, I gave up.

make Error in Git Bash -- Toolchain Not Supported

$ make
J:/LinTeX9527/MyEVAL/Ai-Thinker/WB2-32S-Kit/SDK/Ai-Thinker-WB2/make_scripts_riscv/project.mk:81: *** BL60X_SDK_PATH cannot contain colons. If overriding BL60X_SDK_PATH on Windows, use MSYS Unix-style /c/dir instead of C:/dir. Stop.
In any case, the toolchain only supports three environments: Darwin / Linux / MSYS. Since uname in Git Bash returns MINGW64, it is not supported — don't waste your time.
Setting Up the Development Environment -- Raspberry Pi 5 -- Failed
The Raspberry Pi 5 is also a Linux environment, so I planned to directly use the official Linux development environment and follow the tutorial. Unexpectedly, the build tools are x86-64 binaries and can't run on the Raspberry Pi 5, so I had to give up.
Install the Required Development Tools
sudo apt install build-essential python3 python3-pip git screen

Download the SDK Locally
Since directly accessing github.com is problematic, I downloaded from gitee — the speed is excellent.
git clone --recursive https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2

Grant Permissions to the Toolchain
Since the Raspberry Pi 5 is a Linux environment, run the following commands:
cd toolchain/riscv/Linux
. chmod755.sh
Building helloworld -- Failed: Exec Format Error, Binary Format Not Supported
Entering applications/get-started/helloworld and running make to build resulted in an error, as shown in the figure below:

I checked the toolchain binary directly with riscv64-unknown-elf-gcc --version, and it turned out this binary is not supported.
Running readlef -h riscv64-unknown-elf-gcc showed that this binary is an x86-64 version, which is naturally not supported by the Raspberry Pi 5.
So I gave up on Raspberry Pi 5 development.

Setting Up the Development Environment -- Linux Host -- PASS
Download the SDK
git clone --recursive https://gitee.com/Ai-Thinker-Open/Ai-Thinker-WB2

