3 ms·
You're not giving us much to go on! What, exactly, do you want to do with RISC-V? Depending on your answer, my answer could be anywhere from a $1.50 CH32V003
by brucehoult 3y ago
You're not giving us much to go on!
What, exactly, do you want to do with RISC-V?
Depending on your answer, my answer could be anywhere from a $1.50 CH32V003 board (and $3.50 USB/UART adapter) with 48 MHz CPU, 2 KB RAM and 16 KB flash for your program to a $2500 2 GHz 64 core 128 GB RAM Milk-V Pioneer.
In between, sensible choices include Linux-capable boards including:
- Milk-V Duo, 1 GHz CPU, $9 for 64 MB RAM, $13 for 256M
- anything ranging from the $34 Milk-V Mars CM, the Mars SBC, Pine64 Star64, VisionFive 2, and on up to the $180 Sipeed Lichee Pi 4A with 16 GB RAM. They are all essentially the same production quality and processing power, varying only in RAM (2, 4, 8, 16 GB), WIFI or Ethernet and how many, eMMC or M.2 NVMe options etc. They all take SD cards if that's what you want. Also the CanMV-K230, which has the same speed core, but only 1 of them not 4, and only 512 MB RAM. But it is the only board right now with RISC-V Vector extension 1.0. You get what you pay for.
It's also possible that "Install riscv-gnu-toolchain and QEMU on the computer you already have" is the right answer for you. Or "Run RISC-V Ubuntu (or other distro) in docker (which contains QEMU)". e.g.
bruce@rip:~$ docker run --platform linux/riscv64 -it drujensen/riscv-ubuntu bash
root@8db6fe081ba0:~# cat >hello.c
#include <stdio.h>
int main(){printf("Hello World!\n"); return 0;}
root@8db6fe081ba0:~# gcc -O hello.c -o hello
root@8db6fe081ba0:~# ./hello
Hello World!
root@8db6fe081ba0:~# objdump -d hello | tail
0000000000000668 <main>:
668: 1141 addi sp,sp,-16
66a: e406 sd ra,8(sp)
66c: 00000517 auipc a0,0x0
670: 01c50513 addi a0,a0,28 # 688 <_IO_stdin_used+0x8>
674: f2dff0ef jal ra,5a0 <puts@plt>
678: 4501 li a0,0
67a: 60a2 ld ra,8(sp)
67c: 0141 addi sp,sp,16
67e: 8082 ret
root@8db6fe081ba0:~#
- sandreas 3y agoThank you for that, this is a great overview and good hints for getting started. I was thinking about getting a MangoPi Pro with Allwinner D1 and 1GB RAM from aliexpress, which would cost 33 bucks in my country.
- brucehoult 3y agoMangoPi MQ Pro and the similar Sipeed LicheeRV Dock were great options 12+ months ago. But the price differential to a Mars -- 2 GB or 4 GB RAM, quad core instead of one, 1.5 GHz instead of 1.0, dual-issue instead of single so that's about 1.6x the IPC on average -- is very small when you consider you get overall up to 8x the performance e.g. if building software using `make -j4`. https://arace.tech/products/milk-v-mars https://arace.tech/products/milk-v-mars The VisionFive 2 has overall better support, but reports indicate that a VF2 Linux SD card works fine in a Mars and vice versa, zero changes needed.
- weinzierl 3y agoThanks a lot, this is a fantastic answer. I did not think of QEMU at all, but this a good idea to get started without spending any money.