Skip to content

Contributed by 沈夜, organized by Ai-Thinker

Ai-WB2 SPI Testing (WS2812)

BouffaloSDK is the IOT and MCU software development kit provided by Bouffalo Lab. It supports all series of Bouffalo Smart chips and is also the combination of bl_mcu_sdk and bl_iot_sdk.

<https://github.com/bouffalolab/bouffalo_sdk>

It seems there is no need to download bl_iot_sdk separately.

Thanks to the expert for sharing the code WildboarG

Ai-WB2 SPI Testing

0x1 Start the test

0x2 Compilation errors

Tried it several times but couldn't get it to work.

Decided to download a new one.

When it rains, it pours

Luckily I could access the web page and downloaded an archive.

0x3 Setting up the environment

Renamed the SDK folder and started.

Compile: make CHIP=BL602 BOARD=bl602dk

0x4 Download error

Tried modifying flash_prog_cfg.ini.

Modified the Makefile.

Tried a few times without success, so decisively gave up.

0x5 Continue downloading

Following the expert's reply, I downloaded the latest tool and flashed successfully, but nothing happened when running.

I looked at the Ai-Thinker documentation page and videos, but couldn't find a matching tool configuration file, so that path didn't work.

0x6 So close to success, why give up

Looking at the file, the source code is just one main.c file. Why can't it be flashed successfully?

BouffaloSDK is the IOT and MCU software development kit provided by Bouffalo Lab. It supports all series of Bouffalo Smart chips and is also the combination of bl_mcu_sdk and bl_iot_sdk.

It seems there is no need to download bl_iot_sdk separately.

Tested whether the SDK is really as he described; picked a hello world and compiled and flashed it.

Everything worked fine, so the problem was probably in the configuration file.

Just copied the hello world configuration file, then compiled and flashed in one go.

0x7 Final test

Only one LED lights up, but the demo clearly writes 24.

Searched for the variable — the default value was 1, no wonder.

Five also works normally.

All done!

SDK flashing works fine. SDK compilation works fine. WS2812 display works fine.

0x8 PS

The expert's code works, it's just that...

Found the reason — there's a big problem with his configuration files.

Just copy one from another demo and it works.

BouffaloSDK is the IOT and MCU software development kit provided by Bouffalo Lab, supporting all series of Bouffalo Smart chips.

It turns out two kinds of chips really can share one SDK.

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