Prerequisite
Before you start, install Git first (required to download code, https://git-scm.com/download/win) and we recommend installing VS Code as your code editor (https://code.visualstudio.com/).
Method 1: Use Ai-Thinker Skills to Let AI Install the SDK Automatically (Recommended)
Ai-Thinker Skills are AI assistance capabilities curated by Ai-Thinker. After installation, the AI can clone the SDK, configure the environment, and verify the build for you automatically — no need to run commands manually. If you have never used a terminal before, this is the recommended way to start.
Installing the Ai-M6x development skill coder-ai-m62-m61 is recommended. You can also install all Skills at once.
npx skills add Ai-Thinker-Open/skills --skill coder-ai-m62-m61
# Or install all Skills at once:
npx skills add Ai-Thinker-Open/skillsStart a new session in an AI coding tool that supports Skills (such as Codex or Claude Code) and let the AI set up the SDK for you, for example:
“Please use the coder-ai-m62-m61 skill to set up the Ai-M6x Windows development environment: install dependencies, clone the official Bouffalo SDK, configure the toolchain environment variables, and build the Hello World example.”
Based on the skill guide, the AI will automatically install dependencies, clone the SDK, configure the toolchain, and verify the build. After that, you can move on to flashing and debugging.
About the skill
coder-ai-m62-m61 is a BL616/BL618 series module development guide based on bouffalo_sdk, covering GPIO, UART, SPI, I2C, DMA, and other peripheral programming. Installation and usage: Ai-Thinker Skills | GitHub Repository
Method 2: Manual Environment Setup
Manual setup may look like many steps, but it is really just four things: install the build tools → download the SDK → build your first program → flash it to the board. Each step below explains what to do and what to do if something goes wrong — no terminal experience needed.
You need Git to download and manage code. Open a browser, visit https://git-scm.com/download/win, download the installer, and click through the wizard (the default options are fine).
It is also recommended to install VS Code (https://code.visualstudio.com/) as your code editor — you will use its integrated terminal to build later.
Press the Win key, type PowerShell and press Enter to open a terminal (or type powershell in the File Explorer address bar). Switch to a directory where you want to keep the code (for example the root of the D: drive), then clone the official Bouffalo Lab GitHub repository:
cd D:/— switch to the D: drive root; downloaded files will be stored heregit clone https://github.com/bouffalolab/bouffalo_sdk.git— download the SDK (note: the Gitee mirror has not been updated for a long time, so always use the GitHub repository)
The download time depends on your network speed, so be patient. If you see fatal: unable to access, the network cannot reach GitHub — check your connection or use a proxy and try again.
cd D:/
git clone https://github.com/bouffalolab/bouffalo_sdk.gitThe toolchain translates your code into machine code that the BL616 / BL618 chip can run. Stay in PowerShell and download the Windows toolchain from the official Bouffalo Lab GitHub repository:
cd D:/— go back to the D: drive rootgit clone https://github.com/bouffalolab/toolchain_gcc_t-head_windows.git— download the toolchain; when it finishes, atoolchain_gcc_t-head_windowsfolder is created
cd D:/
git clone https://github.com/bouffalolab/toolchain_gcc_t-head_windows.gitThe system needs to find the toolchain, make, and ninja when building. Open the Start menu, search for “Edit the system environment variables” and open it. Click “Environment Variables” at the bottom right, find Path under “System variables”, double-click it, and add the following three entries (replace D:/ with your actual location):
D:\toolchain_gcc_t-head_windows\bin— the folder containing the toolchain commandsD:\bouffalo_sdk\tools\make— the make build toolD:\bouffalo_sdk\tools\ninja— the ninja build tool (speeds up compilation)
Use the “Move Up” button to put the make entry at the very top so it does not conflict with another make on your system.

Open a brand new PowerShell window (or restart the computer) and run these two commands:
make -v: should printGNU Make 4.2.1riscv64-unknown-elf-gcc -v: should printgcc version 10.2.0 (Xuantie-900 ...)
If Windows says “make is not recognized as a cmdlet or command”, the environment variables have not taken effect: check the paths from the previous step, then open a new terminal (or restart) and try again.
make -v
riscv64-unknown-elf-gcc -vOpen VS Code, choose “File → Open Folder” and select D:/bouffalo_sdk. In the file tree on the left, find examples/helloworld, right-click it and choose “Open in Integrated Terminal”, then run the build command:
CHIP=bl616is the chip model: the Ai-M62 (BL616) and the Ai-M61 (BL618) belong to the same series, so both usebl616, the config with the fewest pinsBOARD=bl616dkis the development board type
The first build downloads dependencies and generates the project, so be patient. When it finishes, the firmware is generated under build/build_out/.
make CHIP=bl616 BOARD=bl616dkConnect the development board to your computer with a USB cable, then follow these steps in order:
- Find the serial port: right-click “This PC” → “Manage” → “Device Manager” → “Ports (COM & LPT)”, and note the port name such as
COM3 - Hold the BOOT button (IO2 on the Ai-M61-32S-Kit), briefly press EN/RST and release it, then release BOOT — the board is now in download mode
- In the VS Code terminal (in the
helloworldfolder), flash the firmware by replacingCOM3with your port name; flashing is done when the progress bar completes
Some USB-to-serial modules such as CH340 do not support 2M baud flashing. If flashing fails, try a lower baud rate (below 500K).
make flash CHIP=bl616 COMX=COM3After flashing, press the reset button on the board and the program starts running. Connect a serial tool to the port at baud rate 2000000 (2M) to see the log — MobaXterm (free) or the “Serial Port Assistant” app from the Microsoft Store both work. When you see the log printed by the program, it is running.
FAQ
"make is not recognized..." or "not recognized as an internal or external command"
The environment variables are not configured. Check that the three paths from the environment step are in the system Path, then open a new terminal (or restart).
Wrong make version
Another make may already exist on your system; use "Move Up" to put D:\bouffalo_sdk\tools\make at the very top of Path.
Where is the COM port?
Right-click "This PC" → Manage → Device Manager → Ports (COM & LPT).
Flashing fails
Make sure the board is in download mode (hold BOOT and briefly press EN/RST again); with modules such as CH340, lower the baud rate below 500K and retry.
Cloning the SDK is slow
Use a proxy if GitHub downloads are slow — do not use the Gitee mirror, which is outdated.
Terminal tips
Tab auto-completes commands in PowerShell; paste with Ctrl+V (right-click also pastes in most terminals).
Have questions?
For any other questions, visit the unified Q&A and discussion board: Ai-Thinker Discussions

