Hello
Did anyone succeed to use Timesys linux FlexCAN driver? Any guidance available?
Looks like it is not possible to use existing FlexCAN driver with SocketCAN without mods to kernel sources. A piece of trouble for embedded linux newbe :-(
. Driver seems initializing, but no chances to make any canX device.
Edward
已解决! 转到解答。
Finally got some time to make it working. Perhaps not the right fix in the sense of Linux kernel coding rules (I'm newbe in Linux), etc, but at least it works with Timesys 3.0 kernel. Send/receive using cansend and candump tools, bitrate configuration with iproute2, all are working well. Those who are interested in, see attached sources for replacement in kernel sources. After enabling FlexCAN in kernel and compiling, can0 device in Linux will correspond to Vybrid CAN1, which is wired to and available in J3 connector on TWR-SER2 board.
Hello Edward,
Unfortunately, the FlexCAN driver is not validated in the Linux 3.0 release for the Vybrid Tower. If this is something you require, Timesys can assist under a services agreement. Let me know if you have any questions.
Thanks,
Timesys Support
Thanks for reply. I don't mind is this driver validated or not, I would like this driver to work somehow. In fact it is partially integrated into kernel, so that we see some FlexCAN message at boot time, which doesn't mean driver is working. Driver is never probed, FlexCAN clocks are kept gated, no can? device accessible via ifconfig etc etc.. Comparing Vybrid to other targets source files in kernel I found about 10 files which need to be modified to make it working. Now driver is probed, but something still is wrong, since kernel crashes. I'm trying to debug it using DS-5 for linux, but for some silly reason Vybrid Tower card CMSIS-DAP interface is not recognised by DS-5 for linux. DS-5 for Windows sees CMSIS-DAP, DS-5 for linux doesn't. I tried building OpenOCD and OpenOCD sees no problems communicating with CMSIS-DAP. Linux is very priceful :-(
Edward
Hello Edward,
When installing DS-5 for Linux, try doing so with 'sudo' - this is necessary for the CMSIS-DAP connection to succeed, as additional drivers will be installed.
If you are looking to debug the Linux kernel, and need to do more than use printk's, you can use KGDB. We have a document published that explains how to use KGDB:
https://linuxlink.timesys.com/docs/kgdb
Thanks,
Timesys Support
HI Ed,
please update the progress on this case and timesyssupport will continue with the follow up.
Finally got some time to make it working. Perhaps not the right fix in the sense of Linux kernel coding rules (I'm newbe in Linux), etc, but at least it works with Timesys 3.0 kernel. Send/receive using cansend and candump tools, bitrate configuration with iproute2, all are working well. Those who are interested in, see attached sources for replacement in kernel sources. After enabling FlexCAN in kernel and compiling, can0 device in Linux will correspond to Vybrid CAN1, which is wired to and available in J3 connector on TWR-SER2 board.