Building the Ai-M61-32S Development Environment on Windows

Prerequisites

This guide covers setting up the development environment for the Ai-M61-32S development board (which shares the same main chip as the Ai-M6X series) on a Windows 10 system.

Installing Visual Studio Code

Download VSCode from the official website:

  1. Visit code.visualstudio.com
  2. Download the Windows installer (.exe)
  3. Run the installer and complete the setup

Installing Git

Gits required for cloning the SDK repositoreis and managing submodules.

  1. Download Git from the official website
  2. During installation, select the following options:
    • Choose "Git from the command line and also from 3rd-party software"
    • Select "Use the OpenSSL library"
    • Configure line ending conversions as needed for your workflow

Cloning the SDK Repository

Clone the main repository along with all submodules using the recursive flag:

git clone --recursive https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git

Expected output:

Cloning into 'AiPi-Open-Kits'...
Receiving objects: 100% (3580/3580), 88.38 MiB | 5.13 MiB/s
Submodule 'aithinker_Ai-M6X_SDK' registered for path 'aithinker_Ai-M6X_SDK'
Submodule path 'aithinker_Ai-M6X_SDK/toolchain': checked out
Submodule path 'aithinker_Ai-M6X_SDK/tools': checked out

The clone operation downloads the main repository along with:

  • The Ai-M6X SDK submodule
  • Toolchain submodule
  • Tools submodule

Project Structure

After cloning, the directory structure includes:

AiPi-Open-Kits/
├── aithinker_Ai-M6X_SDK/
│   ├── toolchain/
│   └── tools/
└── ...

Configuring Environment Variables

Add the following paths to your system PATH environment variable:

Component Path
Toolchain <clone_path>/aithinker_Ai-M6X_SDK/toolchain/bin
Tools <clone_path>/aithinker_Ai-M6X_SDK/tools

To edit environment variables:

  1. Open System Properties → Advanced → Environment Variables
  2. Locate the "Path" variable under System variables
  3. Click "Edit" → "New"
  4. Add each path listed above

Verifying the Setup

Confirm the toolchain is accessible by running:

riscv64-unknown-elf-gcc --version

A successful output displays the GCC version information, confirming the environment is properly configured.

To verify the full build chain, navigate to a project directory and run the build command specified in the project documentation.

Troubleshooting

Slow clone speeds: The repository size exceeds 1GB. Consider running the clone operation during off-peak hours or using a wired connection.

Submodule initialization failures: If submodules fail to initialize, run:

git submodule update --init --recursive

Environment variables not recognized: Restart your terminal or VSCode after modifying PATH to ensure changes take effect.

Tags: Ai-M61-32S embedded development-setup Windows RISC-V

Posted on Fri, 28 Aug 2026 16:13:22 +0000 by porco