FZ3A

Q:在程序make阶段,出现了串口库库文件缺失导致的函数定义未被实现的报错:

A:安装相关串口库,以下是相关文件

libserial-dev_1.0.0-4_arm64.deb

libserial1_1.0.0-4_arm64.deb

gcc-10-base_10-20200411-0ubuntu1_arm64.deb

libgcc-s1_10-20200411-0ubuntu1_arm64.deb

libc6_2.27-3ubuntu1_arm64.deb

libgccjit-7-dev_7.5.0-6ubuntu2_arm64.deb

gcc-7-base_7.5.0-6ubuntu2_arm64.deb

libgcc-7-dev_7.5.0-6ubuntu2_arm64.deb

libasan4_7.5.0-6ubuntu2_arm64.deb

libubsan0_7.5.0-6ubuntu2_arm64.deb

以上文件存在依赖关系,顺序已经忘了,请自行尝试。

并修改CMakeList.txt文件,加入:

set(SERIAL_LIBRARY “/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/libserial.so”)
set(SERIAL_INCLUDE_DIR “/usr/include/serial”)

include_directories(${SERIAL_INCLUDE_DIR})


Q:CH340插上后无法识别出/dev/ttyUSB0

A:请使用/dev/ttyPS1,通过串口直接发送数据

例如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
driver = std::make_shared<Driver>("/dev/ttyPS1", BaudRate::BAUD_115200);
if (driver == nullptr) {
std::cout << "Create Uart-Driver Error!" << std::endl;
return -1;
}
// 串口初始化,打开串口设备及配置串口数据格式
int ret = driver->open();
if (ret != 0) {
std::cout << "Uart Open failed!" << std::endl;
return -1;
}
string str = "1234";
for(auto& c:str){
driver->senddata(c);
}

unsigned char ch;
driver->recvdata(ch,(size_t)10000);
for(int i=0;i<10;i++){
driver->senddata(ch);
}

现存问题

在使用yolov3_mobilenet_v1训练的模型进行预测时,predictor->Run();阶段,出现以下问题(分别为cpu 和 fpga 两种模式的报错)

cpu

fpga