1、./TestMasterMicroMod -l ../lib/libcanfestival_can_socket.so -i 0x00 -m 0 -M 500K
void help_menu(void) { printf(" MANDATORY COMMAND (must be the first command):\n"); printf(" load#CanLibraryPath,channel,baudrate,nodeid,type (0:slave, 1:master)\n"); printf("\n"); printf(" NETWORK: (if nodeid=0x00 : broadcast)\n"); printf(" ssta#nodeid : Start a node\n"); printf(" ssto#nodeid : Stop a node\n"); printf(" srst#nodeid : Reset a node\n"); printf(" scan : Reset all nodes and print message when bootup\n"); printf(" wait#seconds : Sleep for n seconds\n"); printf("\n"); printf(" SDO: (size in bytes)\n"); printf(" info#nodeid\n"); printf(" rsdo#nodeid,index,subindex : read sdo\n"); printf(" ex : rsdo#42,1018,01\n"); printf(" wsdo#nodeid,index,subindex,size,data : write sdo\n"); printf(" ex : wsdo#42,6200,01,01,FF\n"); printf("\n"); printf(" Note: All numbers are hex\n"); printf("\n"); printf(" help : Display this menu\n"); printf(" quit : Quit application\n"); printf("\n"); printf("\n"); }
4、ip link set can0 type can bitrate 500000 设置CAN0波特率500K赫兹;
5、./configure --cc=arm-linux-gnueabihf-gcc --arch=arm --os=unix --kerneldir=/usr/src/linux-3.5.7 --prefix=$PWD/myinstall --target=unix --can=socket --timers=unix -- debug=WAR,MSG
配置CANfestival源码,下一步make,make install就行。
6、./objdictedit.py ../examples/TestMasterMicroMod/TestMaster.od
用objdictedit.py工具编辑上一级文件中的TestMasterMicroMod的对象字典。
7、特别注意,主站配置SDO CLIENT!