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:
- Visit code.visualstudio.com
- Download the Windows installer (.exe)
- Run the installer and complete the setup
Installing Git
Gits required for cloning the SDK repositoreis and managing submodules.
- Download Git from the official website
- 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:
- Open System Properties → Advanced → Environment Variables
- Locate the "Path" variable under System variables
- Click "Edit" → "New"
- 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.