This project provides a clean, baremetal development environment for the C-DAC Aries V3 (VEGA ET1031 / THEJAS32) RISC-V development board using PlatformIO. It allows you to build and upload code to the Aries V3 board without relying on Eclipse or complex Makefiles, integrating seamlessly with VS Code.
This project includes a working example of the ssd1306 I2C OLED display driver, ported correctly to compile with PlatformIO.
If want to use Aries V3.0 Dev board with Tauras SDK, check out my automation using Tauras SDK Repository here.
Before you begin, ensure you have the following installed on your Windows system:
- VS Code
- PlatformIO IDE Extension (Install within VS Code)
- VEGA SDK, Toolchain for Windows and Upload Tools
(Important Note: After downloading the VEGA-SDK copy it in a different location as we need it twice, for SDK access & again for PlatformIO Support files. In a copy of VEGA-SDK branch should be switched to aries from master branch and set the path in the platformio.ini file)
- After Downloading VEGA-SDK run this commands in the terminal ( git should be preinstalled in PC ):
cd vega-sdk
git checkout aries
(Must: !! after running git checkout aries place the libvega.a file in the directory /vega-sdk/bsp/)
!! Do this steps if you forking from Gitlab Repository, otherwise only run the commands inside vega-sdk directory and you are good to go.
Unlike standard PlatformIO boards, the Aries V3 requires the official VEGA SDK and Toolchain to compile its baremetal drivers. You must tell PlatformIO where these tools are located.
Open the platformio.ini file located in the root of this project and update the paths to match where you extracted the VEGA SDK and Toolchain on your PC:
[env:aries_v3]
; ... other settings ...
; ==========================================================
; ⚠️ CRITICAL: UPDATE THESE PATHS TO MATCH YOUR SYSTEM! ⚠️
; ==========================================================
; Use forward slashes (/) or double backslashes (\\)
vega_sdk_path = /path/where/Vega-sdk/is/located
vega_tools_path = /path/where/vega-tools-windows/is/located/bin
vega_flasher_dir = /path/where/vega-flasher-windows/is/located- Connect the UART/Debug USB port of the Aries V3 board to your PC.
- Identify the COM port it connected to (e.g.,
COM3,COM9). You can check this in Windows Device Manager under "Ports (COM & LPT)".
To compile the project, use the PlatformIO build button (checkmark icon ✓) in the bottom toolbar of VS Code, or run the following command in the PlatformIO ide CLI:
pio run(or the build button in platformIO ide)
To flash the compiled binary to the Aries V3 board, you must specify the COM port you identified earlier.
- Ensure no other program (like TeraTerm or PuTTY) is currently using the COM port.
- Run the following command in the terminal, replacing
<YOUR_COM_PORT>with your actual port (e.g.,COM3):
pio run --target upload --upload-port <YOUR_COM_PORT>(or the upload button in platformIO ide after selecting the correct COM port)
Note: The upload script uses XMODEM protocols internally via a custom flasher script (flasher.bat).
This project uses a custom build script to seamlessly compile the VEGA SDK source files alongside your project files.
aries_pio_project/
├── .vscode/ # VS Code workspace settings
├── boards/
│ └── aries_v3.json # Custom highly-tailored board definition
├── extra_scripts/
│ ├── build_vega.py # PlatformIO extra_script (pre): handles SDK compilation & flags
│ └── upload_vega.py # PlatformIO extra_script (post): handles XMODEM upload
├── src/ # Your application source code goes here!
│ ├── fonts.h # OLED font data
│ ├── ssd1306.c # I2C OLED Driver
│ ├── ssd1306.h
│ └── main.c # Main application entry point
├── platformio.ini # PlatformIO configuration & Path settings
└── README.md # This file
- Compiler Optimization Bug: The official Linux VEGA SDK builds without optimization (
-O0). PlatformIO defaults to-O2. Aggressive-O2optimization breaks the SDK'sudelay()timing functions and pointer-based data arrays (like OLED image buffers). This project's custombuild_vega.pyscript explicitly enforces-O0along with the necessary RISC-V memory models (-mcmodel=medany,-fno-pic) to ensure identical behavior to the official SDK. - Missing standard libraries: The SDK requires its own
stdlib.cand does not use the standardlibc. The custom build script automatically includes these. - I2C Initialization: Check
main.cfor proper I2C initialization (i2c_configure()) which is strictly required for peripherals like displays.