กลับไปหน้ารวมไฟล์
arduino-on-49-risc-v-board-f1584c-en.md

Project Overview

The "Arduino on RISC-V" project explores the bleeding edge of open-source hardware by porting the Arduino ecosystem to the Sipeed Longan Nano. Priced at an incredibly low $4.9, the Longan Nano is powered by the GigaDevice GD32VF103CBT6, a 32-bit RISC-V microcontroller. This project is significant because it moves beyond the traditional AVR and ARM architectures, allowing developers to utilize the RV32IMAC instruction set while maintaining the familiar Arduino workflow. It covers integration with RTOS (Real-Time Operating Systems) and the creation of high-performance GUIs on the board's built-in 160x80 color LCD.

Longan Nano

Sipeed Longan Nano could be the most inexpensive RISC-V development board currently available. With only $4.9, you will get 128KB Flash, 32KB RAM, 160x80 LCD, TF card slot and even an acrylic transparent case.

GD32V Series Microcontroller

The main chip on the board is a GigaDevice GD32V Series microcontroller, GD32VF103CBT6. From the information provided by RISC-V website, it is a 32-bit SOC with RV32IMAC instruction set and its core named "Bumblebee".

Technical Architecture & RTOS Integration

  • Bumblebee Core (RV32IMAC): Unlike standard Arduino boards, this MCU uses the RISC-V architecture. It operates at 108MHz, significantly faster than an Arduino UNO (16MHz). The "IMAC" suffix denotes support for Integer, Multiply, Atomic, and Compressed instructions, enabling high-density code and efficient execution.
  • RT-Thread RTOS Integration: To bridge the gap between the bare-metal RISC-V hardware and the Arduino API, this project utilizes RT-Thread. RT-Thread provides a robust hardware abstraction layer (HAL) for UART, SPI, and LCD, while also offering advanced features like a thread-aware scheduler and a tiny shell (FinSH) for real-time debugging.
  • Memory Management: With 128KB of Flash and 32KB of SRAM, the Longan Nano offers more headroom than an ATmega328P. However, running a full GUI and RTOS requires careful memory allocation. The project employs RTT-GUI, which uses optimized BMP/JPEG decoders to render visuals on the ST7735-based LCD without exhausting the SRAM.
  • PlatformIO Workflow: While the Arduino IDE is supported on Windows, professional developers often use PlatformIO for its superior library management and debugging capabilities. The configuration includes defining BOARD_SIPEED_LONGAN_NANO to ensure the correct hardware-specific macros are enabled during compilation.

Engineering & Hardware Features

  • Display Interfacing: The built-in 0.96-inch LCD is connected via high-speed SPI. The implementation of the LCD driver within the RT-Thread framework allows for non-blocking screen updates, crucial for maintaining system responsiveness.
  • Expansion & Storage: The onboard TF (MicroSD) card slot is interfaced via SPI. In the context of an RTOS, this allows for the inclusion of the FatFS library, enabling the device to function as a data logger or a handheld emulator.
  • Open Hardware Ecosystem: By supporting RISC-V, this project contributes to a royalty-free, globally accessible hardware standard, reducing dependency on proprietary IP like ARM or AVR.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino on $4.9 RISC-V Board"
description: "Longan Nano with GD32V series MCU costs only $4.9. You then got a Arduino board with 128KB Flash, 32KB RAM, LCD and even an acrylic case."
author: "onelife"
category: ""
tags:
  - "rt-thread"
  - "rtos"
  - "risc-v"
  - "gd32v"
views: 33770
likes: 3
price: 1120
difficulty: "Easy"
components:
  - "1x Sipeed Longan Nano - RISC-V GD32VF103CBT6 Development Board"
tools: []
apps:
  - "1x PlatformIO IDE"
  - "1x RT-Thread IoT OS"
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "03994d254b2a867b3ab973fcccc091ce3e92cf68af4d32f7c889485ea33e6f86"
encryptedPayload: "U2FsdGVkX19DydIzUnDunUsQGhL6VfUxLyYvcU31yrypUnmsV2v6roNhsFxUbDrNyh7atwwiorJpe112i0lUZXvcA9MAEJyNAyvdFeMyWMmMupixt47dVm/5DQTOJjsjy8+itWHGrrrIY8LRbstQFQ=="
seoDescription: "Run Arduino on the $4.9 Longan Nano RISC-V Board featuring GD32V MCU, 128KB Flash, 32KB RAM, and built-in LCD."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-on-49-risc-v-board-f1584c_cover.jpg"
lang: "en"