Contributed by Shenye, organized by Ai-Thinker
Ai-Thinker-WB2 Project Update and ws2812 Build Guide
🌟 Ai-Thinker-WB2 Project Update and Build Guide 🌟
If you have already cloned the Ai-Thinker-WB2 repository and want to update it to the latest version and build a specific demo, just follow the steps below — simple and efficient.
📥 How to Update an Already-Cloned Repository?
If you have previously downloaded the project via git clone, there is no need to clone it again. Simply run the update command directly in the local repository directory:
Click to expand: ## Enter the project directory
bash
## 进入项目目录
cd
Ai-Thinker-WB2
## 拉取最新代码
git pull- Effect:
git pullautomatically syncs the latest changes from the remote repository to your local machine, keeping the code consistent with the official latest version. - Note: If there are uncommitted local changes, conflicts may occur. You need to resolve the conflicts before running
pull.
🔨 How to Build demo_ws2812 After Updating?
After the update is complete, enter the target demo directory and build:
Click to expand: ## Enter the demo_ws2812 directory
bash
## 进入 demo_ws2812 目录
cd
applications/iot-solution/demo_ws2812
## 开始编译(-j8 表示使用 8 个线程加速编译)
make -j8- Build successful: a flashable firmware file (usually in
.binformat) will be generated in the directory. - Build failed: it may be due to missing environment dependencies or code errors. It is recommended to check whether the build environment is configured correctly (e.g., toolchain, dependency libraries, etc.).

📝 Operation Summary
| Step | Command | Description |
|---|---|---|
| 1 | cd Ai-Thinker-WB2 | Enter the project root directory |
| 2 | git pull | Pull the latest code to update the local repository |
| 3 | cd applications/iot-solution/demo_ws2812 | Enter the target demo directory |
| 4 | make -j8 | Build the project with multiple threads |
By following the steps above, you can complete the whole process from updating the code to building the specified demo. This is suitable for scenarios where you need to continuously keep up with the latest version of the project and verify functionality.

