前言
本板性能強(qiáng)勁,運(yùn)行Debian桌面系統(tǒng),所以我們完全可以直接板上開發(fā),避免交叉編譯開發(fā)帶來的繁瑣,本篇就以Sqlite3的編譯測試為例來進(jìn)行,體驗(yàn)直接板上進(jìn)行C開發(fā)。
安裝gcc工具鏈等可能需要比較大的空間,可參考如下文檔。
http://www.tjjbhg.com/d/2185811.html
http://www.tjjbhg.com/d/2184550.html
聯(lián)網(wǎng),配置源可參考文檔:
http://bbs.eeworld.com.cn/thread-1249527-1-1.html
http://bbs.eeworld.com.cn/thread-1249396-1-1.html
安裝工具
sudo apt update
sudo apt upgrade
sudo apt-get install lrzsz //rz sz文件傳輸使用
sudo apt install make
sudo apt install gcc
sudo apt install git
sudo apt install tcl
sudo apt-get install tcl-dev
sudo apt install zlib1g-dev
下載源碼
wget https://www.sqlite.org/src/tarball/sqlite.tar.gz
或
git clone https://github.com/sqlite/sqlite.git
構(gòu)建
cd sqlite/
mkdir bld ;# Build will occur in a sibling directory
cd bld ;# Change to the build directory
../configure ;# Run the configure script
make sqlite3.c ;# Build the "amalgamation" source file
make ;# Run the makefile.
構(gòu)建大概花了不到20min,也還是可以接受的,
運(yùn)行 ./sqlite3
root@starfive:~/sqlite/bld# ./sqlite3
SQLite version 3.43.0 2023-07-18 13:55:19
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite >
測試
make test ;# Run some tests (requires Tcl)
make test ;# Run some tests (requires Tcl)
如果報(bào)如下錯(cuò)誤
/usr/bin/ld: /tmp/cccaPGbP.o: in function `fillInCell':
/root/sqlite/bld/./sqlite3.c:75921: undefined reference to `uncompress'
collect2: error: ld returned 1 exit status
make: *** [Makefile:714: sessionfuzz] Error 1
則
nano Makefile 添加-lz
報(bào)錯(cuò)tcl.h找不到,則查找
/usr/include/tcl8.6/tcl-private/generic/tcl.h
/usr/include/tcl8.6/tcl.h
添加頭文件包含路徑
如果提示tcl相關(guān)函數(shù)未定義
添加-ltcl
測試結(jié)果如下
總結(jié)
得益于開發(fā)板強(qiáng)勁的性能,直接在板上進(jìn)行C開發(fā)非常方便,構(gòu)建一般規(guī)模的項(xiàng)目時(shí)間還是可以接受的,省去了交叉編譯的麻煩。
審核編輯:湯梓紅
-
usb
+關(guān)注
關(guān)注
60文章
8150瀏覽量
271211 -
計(jì)算機(jī)
+關(guān)注
關(guān)注
19文章
7636瀏覽量
90303 -
GCC
+關(guān)注
關(guān)注
0文章
110瀏覽量
25262 -
開發(fā)板
+關(guān)注
關(guān)注
25文章
5570瀏覽量
102892 -
交叉編譯
+關(guān)注
關(guān)注
0文章
33瀏覽量
12830 -
單板計(jì)算機(jī)
+關(guān)注
關(guān)注
0文章
84瀏覽量
15916 -
編譯
+關(guān)注
關(guān)注
0文章
676瀏覽量
33803 -
RISC-V
+關(guān)注
關(guān)注
46文章
2508瀏覽量
48361
發(fā)布評論請先 登錄
【昉·星光 2 高性能RISC-V單板計(jì)算機(jī)體驗(yàn)】+3、系統(tǒng)功能測試

昉·星光單板計(jì)算機(jī)正式發(fā)售,加速RISC-V生態(tài)發(fā)展

【昉·星光 2 高性能RISC-V單板計(jì)算機(jī)體驗(yàn)】VisionFive2開箱+安裝Ubuntu
賽昉科技昉·星光RISC-V單板計(jì)算機(jī)首發(fā)試用
【RISC-V專題】賽昉科技昉·星光RISC-V單板計(jì)算機(jī)首發(fā)試用
RISC-V VisionFive (昉星光單板計(jì)算機(jī))系列課程
【賽昉科技昉·星光RISC-V單板計(jì)算機(jī)試用體驗(yàn)】開箱+心得
【RISC-V專題】昉·星光 2(VisionFive 2)RISC-V單板計(jì)算機(jī)免費(fèi)試用
【昉·星光 2 高性能RISC-V單板計(jì)算機(jī)體驗(yàn)】2更換Debian操作系統(tǒng)
【RISC-V + OpenCV 計(jì)算機(jī)視覺】用 VisionFive 2 昉·星光 2 進(jìn)行物體識別
【昉·星光 2(VisionFive 2)RISC-V單板計(jì)算機(jī)】根目錄擴(kuò)容-愉快的install大型軟件
昉·星光2 RISC-V單板計(jì)算機(jī)體驗(yàn)(三) - SSH連接

評論