0 【自选开发板活动】Lichee RV开箱和简单测试 - 新手园地 - 21ic电子技术开发论坛
打印

【自选开发板活动】Lichee RV开箱和简单测试

[复制链接]
7155|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
本帖最后由 dirtwillfly 于 2022-4-10 16:16 编辑

1. 开箱打开快递,发现Lichee RV非常mini,出乎我的想象。上个对比图,大家看看。

这是一个全志D1(现在官网上叫D1-H)芯片的低成本核心板。sipeed出品,官网名称叫做Lichee RV哪吒计算条,可以搭配Lichee RV HDMI Dock底板或者Lichee RV 86 Panel底板。
Lichee RV哪吒计算条的主要特性:
- 主控:全志D1H,平头哥玄铁C906内核,1GHz
- 内存:512MB ddr3
- 存储:TF卡启动
- 显示:预留一个小尺寸spi lcd的fpc排座,官方说是1.14英寸135x240的液晶屏。
- 接口:1)USB-OTG接口,2)2.54 4PIN系统串口,3)通过双M.2 B-Key金手指连接器,预留出67x2PIN
- 尺寸:46x25mm
以上是核心板的主要接口和器件。


使用特权

评论回复

相关帖子

沙发
dirtwillfly|  楼主 | 2022-4-10 15:13 | 只看该作者
本帖最后由 dirtwillfly 于 2022-4-10 16:11 编辑

2 D1-H介绍
2.1 简介
D1-H 是全志科技首款基于RISC-V指令集的芯片,集成了阿里平头哥64位C906核心,支持RVV,1GHz+主频,可支持Linux、RTOS等系统。同时支持最高4K的H.265/H.264解码,内置一颗HiFi4 DSP,最高可外接2GB DDR3,可以应用于智慧城市、智能汽车、智能商显、智能家电、智能办公和科研教育等多个领域。

2.2 芯片框图

系统框图:

除系统框图外,官方还提供了一个多媒体解码的解决方案系统图:

从上面两幅框图看,全志给D1-H芯片搭载了丰富的多媒体类外设,这也是全志之前产品主要的应用场景。
与之前的产品主要区别在于内核,D1-H采用的是RISC-V指令集的玄铁C906,我想这应该也是把这个核心板起名叫哪吒的原因吧。


2.3 规格参数
CPU:
    阿里平头哥玄铁C906,64bit RISC-V指令集
    32 kB I-cache+32 kB D-cache

DSP:
  HiFi4 DSP  600MHz
  32 KB I-cache + 32 KB D-cache
  64 KB I-ram + 64 KB D-ram


存储:
    DDR2/DDR3,最大支持到2GB
    SD3.0/eMMC 5.0,SPI Nor/Nand Flash

视频特性
解码
     H.265 up to 1080p@60fps, or 4K@30fps
     H.264 up to 1080p@60fps, or 4K@24fps
    MPEG-1/2/4, JPEG, VC1 up to 1080p@60fps
编码
    JPEG/MJPEG up to 1080p@60fps
    Supports input picture scaler up/down
输出
    RGB LCD output interface up to 1920 x 1080@60fps
    Dual link LVDS interface up to 1920 x 1080@60fps
    4-lane MIPI DSI interface up to 1920 x 1080@60fps
    HDMI V1.4 output interface up to 4K@30fps
    CVBS OUT interface, supporting NTSC and PAL format
输入
     8-bit parallel CSI interface
    CVBS IN interface, supporting NTSC and PAL format

音频
    2 DACs and 3 ADCs
    Analog audio interfaces: MICIN1P/N, MICIN2P/N, MICIN3P/N, FMINL/R, LINEINL/R, LINEOUTLP/N, LINEOUTRP/N, HPOUTL/R
    Digital audio interfaces: I2S/PCM, DMIC, OWA IN/OUT

接口
     USB2.0 OTG, USB2.0 Host
    SDIO 3.0, SPI x 2, UART x 6, TWI x 4
    PWM (8-ch), GPADC (2-ch), LRADC (1-ch), TPADC (4-ch), IR TX&RX
   10/100/1000M EMAC with RMII and RGMII interfaces

封装
    LFBGA BGA13*13/0.35/0.65mm,337 PINS

生产工艺
    22nm


使用特权

评论回复
板凳
dirtwillfly|  楼主 | 2022-4-10 15:13 | 只看该作者
本帖最后由 dirtwillfly 于 2022-4-10 16:35 编辑

3 系统烧录
D1-H的开发方式,有三种可以选:
1)debian镜像,新手建议选这个
2)tina镜像,熟悉的高手可以选这个,全志主推这个系统。基于openwrt魔改而来,全志的很多芯片都支持这个系统。
3) waft,这个是阿里云推出的东东,做前端的建议选这个。是一个面向 AIoT 的高性能应用研发框架,Waft 基于 WebAssembly 和自研的渲染引擎技术打造,适用于智能终端的软件应用研发场景。


考虑后面自己买个Lichee HDMI Dock底板,这里先选择LicheeRV_Debian_dock_hdmi_8723ds.img进行测试。

烧录软件:PhoenixCard
硬件:>=16G的tf卡一张,以及一个tf卡读卡器。

烧录过程比较简单:
1)点“固件”按钮选择要烧录的固件;
2)制作卡的种类选择“启动卡”;
3)从列表里选择你的tf卡;
4)点“烧卡”。
然后就会向下面图片一样:


注意:在状态显示40%的时候,虽然进度条不动了,输出信息栏也没有输出内容了,请千万不要动!!!

要一直等它自己进行完,时间会稍微长一点。
直到输出栏出现如下各种操作“完成”,表示烧录完成:

使用特权

评论回复
地板
dirtwillfly|  楼主 | 2022-4-10 15:13 | 只看该作者
本帖最后由 dirtwillfly 于 2022-4-10 17:02 编辑

4 启动
把TF卡插到哪吒计算条,并连接号usb转ttl模块到pc。
pc打开串口调试工具,我这里用的是xshell。在串口调试工具打开相应的串口,波特率设置为115200,其他配置使用默认的就可以。
然后用type-c数据线供电(或用usb转ttl供5V电),在串口调试工具会输出启动信息:

[93]HELLO! BOOT0 is starting!
[96]BOOT0 commit : 27369ab

OpenSBI v0.6
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
| |  | |_ __   ___ _ __ | (___ | |_) || |
| |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
| |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs     : 1
Current Hart           : 0
Firmware Base          : 0x40000400
Firmware Size          : 75 KB
Runtime SBI Version    : 0.2

MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0    : 0x0000000040000000-0x000000004001ffff (A)
PMP1    : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2    : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3    : 0x0000000000020000-0x0000000000027fff (A,?

U-Boot 2018.05-g0a88ac9-dirty-config-dirty (Dec 14 2021 - 18:32:11 +0800) Allwinner Technology

[00.232]DRAM:  512 MiB
[00.234]Relocation Offset is: 1df30000
[00.238]secure enable bit: 0
[00.241]CPU=1008 MHz(1008),PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.248]flash init start
[00.250]workmode = 0,storage type = 1
[00.253][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[00.259][mmc]: get sdc_type fail and use default host:tm1.
[00.265][mmc]: can't find node "mmc0",will add new node
[00.270][mmc]: fdt err returned <no error>
[00.274][mmc]: Using default timing para
[00.278][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.296][mmc]: card_caps:0x3000000a
[00.299][mmc]: host_caps:0x3000003f
[00.302]sunxi flash init ok
[00.305]line:714 init_clocks
__clk_init: clk pll_periph0x2 already initialized
register fix_factor clk error
[00.327]Loading Environment from SUNXI_FLASH... OK
[00.347]out of usb burn from boot: not need burn key
root_partition is rootfs
set root to /dev/mmcblk0p7
[00.358]update part info
[00.361]update bootcmd
[00.365]change working_fdt 0x5eaefda8 to 0x5eacfda8
[00.384]update dts
Hit any key to stop autoboot:  0
Android's image name: d1-nezha
No reserved memory region found in source FDT
[00.817]
Starting kernel ...

[00.820][mmc]: MMC Device 2 not found
[00.824][mmc]: mmc 2 not find, so not exit

Welcome to Debian GNU/Linux 11 (bullseye)!

[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
         Mounting Kernel Debug File System...
         Starting Create list of st…odes for the current kernel...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module drm...
         Starting Load Kernel Module fuse...
         Starting File System Check on Root Device...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Finished Create list of st… nodes for the current kernel.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module fuse.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
[  OK  ] Started File System Check Daemon to report status.
[  OK  ] Finished File System Check on Root Device.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Journal Service.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
         Starting Create System Users...
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
         Starting Apply Kernel Variables...
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Create Volatile Files and Directories...
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Finished Tell Plymouth To Write Out Runtime Data.
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Finished Update UTMP about System Boot/Shutdown.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Coldplug All udev Devices.
         Starting Helper to synchronize boot up for ifupdown...
         Starting Show Plymouth Boot Screen...
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Started Forward Password R…s to Plymouth Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Periodic ext4 Onli…ata Check for All Filesystems.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily man-db regeneration.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting Connection service...
         Starting DUN service...
         Starting Remove Stale Onli…t4 Metadata Check Snapshots...
         Starting Telephony service...
         Starting System Logging Service...
         Starting User Login Management...
         Starting LSB: Start busybox udhcpd at boot time...
         Starting Disk Manager...
         Starting WPA supplicant...
[  OK  ] Started System Logging Service.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started LSB: Start busybox udhcpd at boot time.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started DUN service.
[  OK  ] Finished Helper to synchronize boot up for ifupdown.
[  OK  ] Started Telephony service.
[FAILED] Failed to start Remove Sta…ext4 Metadata Check Snapshots.
See 'systemctl status e2scrub_reap.service' for details.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Connection service.
[  OK  ] Started User Login Management.
[  OK  ] Reached target Hardware activated USB gadget.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
         Starting Save/Restore Sound Card State...
         Starting Raise network interfaces...
         Starting Authorization Manager...
         Starting Hostname Service...
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Authorization Manager.
[  OK  ] Finished Save/Restore Sound Card State.
[  OK  ] Reached target Sound Card.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Started Disk Manager.
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
         Starting Light Display Manager...
         Starting Hold until boot process finishes up...

Debian GNU/Linux 11 sipeed ttyS0

sipeed login:

从启动信息,可以看出整个启动过程,以及相关的信息。先启动了OpenSBI,然后启动uboot,然后kernel。
在uboot阶段,可以看到内存是512MB,CPU主频是1008Mhz。
在开始引导kernel是有这么一句话“Android's image name: d1-nezha”
从这里可以看出这个uboot之前是为一个Android系统设计的,现在被用来引导启动debian。
在linux启动过程有几个错误信息,咱们暂时先不管。

使用账号:sipeed,密码:licheepi登录系统后,出现如下信息:
sipeed login: sipeed
Password:
Linux sipeed 5.4.61 #207 PREEMPT Fri Dec 24 10:07:52 UTC 2021 riscv64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon May 24 07:08:35 UTC 2021 from 192.168.1.102 on pts/0
sipeed@sipeed:~$
Message from syslogd@sipeed at May 24 06:56:47 ...
kernel:[   51.835254] Oops [#4]


可以看到这是一个打了PREEMPT补丁的Debian系统。


使用特权

评论回复
5
dirtwillfly|  楼主 | 2022-4-10 15:13 | 只看该作者
本帖最后由 dirtwillfly 于 2022-4-10 17:11 编辑

5 解决“Message from syslogd。。。”问题
在shell下,系统不停地输出“Message from syslogd。。。”等信息,非常影响输入命令和观察输出内容。

解决方法:
1) 进入etc目录
cd /etc
2) 打开rsyslog.conf文件。测试下了发现该系统自带nano工具。
sudo nano rsyslog.conf
3)注释掉*.emerg *
#*.emerg *
4)保存文件
先按ctrl+x,然后输入:y。
5)复位rsyslog服务
systemctl restart rsysctl
shell中会显示如下内容,表示成功了:

从此,再也不用承受Message from syslogd。。。的骚扰了


使用特权

评论回复
6
dirtwillfly|  楼主 | 2022-4-10 15:13 | 只看该作者
本帖最后由 dirtwillfly 于 2022-4-10 17:22 编辑

6 简单测试
没有底板,先看看能做什么。
1)听说这个板子自带gcc
输入:
gcc -v
显示:
sipeed@sipeed:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/riscv64-linux-gnu/10/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=riscv64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=riscv64-linux-gnu --host=riscv64-linux-gnu --target=riscv64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
sipeed@sipeed:~$
very good,有gcc可以用~~~

2)新建个目录
mkdir hello
3)进入hello目录
cd hello
4)新建hello.c
nano hello.c
5) 输入代码
#include<stdio.h>
int main()
{
    printf("Hello world!\n");
    return 0;
}
6)保存
按ctrl+x,输入:y。
7)编译
gcc hello.c -o hello
8)看一下编译结果
la -al
9)没问题的话就可以运行了
./hello
查看编译结果和运行后输出内容如下:


好了,最简单的测试hello world成功了~~~

使用特权

评论回复
7
dirtwillfly|  楼主 | 2022-4-10 17:24 | 只看该作者

使用特权

评论回复
评论
21ic小喇叭 2022-4-11 10:54 回复TA
@21小跑堂 申请原创@小跑堂哦~ 
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:欢迎进入TI MCU论坛      21ic TI技术交流1群:61549143(已满),  21ic TI技术交流2群:311421422 我的博客:http://blog.timcu.com/

1183

主题

34959

帖子

1117

粉丝