【发布时间】:2020-10-28 21:51:58
【问题描述】:
我正在尝试在运行 Ubuntu 18.04、内核 5.4.0-52-generic 的嵌入式 Linux 系统上使用 CAN J1939 标准。
This elinux page 表示 j1939.h “从 v5.4 开始进入主线内核”。而kernel.org's documentation for j1939 表示它在主内核中。
最后,我确实安装了 can-utils。
当我使用 #include <linux/can/j1939.h> 编译 cpp 文件时,我收到 no such file or directory 错误。
我已经通过linux/can 目录确认,j1939.h 不存在。我的 v5.4 内核没有j1939.h 有什么原因吗?如何在我的程序中最好地使用j1939.h?
【问题讨论】: