The document describes the system environment under MiniLinux iTOP-4418 CAN experimental commissioning steps. Provides "can_libs.rar", "can_tools.zip" and "iTOP-4418-MiniLinux-CAN_V1.0.rar" compression package, namely can the tools they need libraries, tools can binaries and can experiment C program source code.
CAN is an abbreviation of Controller Area Network, is the ISO international standard serial communication protocol. In recent years, they have high reliability and good error detection capability attention, it is widely used in automotive computer control system and ambient temperature harsh, strong electromagnetic radiation and vibration of large industrial environments.
1 hardware connection
Testing can, using two fast as a 4418 development board. Requires two optional CAN bus module, the discharge section by the mother boards "GPIO / CAN / 485", can connect the module + + - connections -, as shown below.
2 canconfig tool configuration
First, configuration tools and libraries, the compressed "can_libs.rar" and "can_tools.zip" unpack "can_tools" and "can_libs", to copy the file decompression tf u card or disk, as shown in FIG.
Then tf card or u disk loading to the development board (refer to user manual section 11.3.3), as shown below.
Tools to copy / bin directory, using the command "cp -r can_tools / * / bin /", as shown below.
Using the command "cp -r can_libs / * / lib /" copy library files to / lib directory, as shown in FIG.
Use the command "cd / lib" into the / lib directory, use the "ln -s libsocketcan.so.2.2.1
libsocketcan.so "and" ln -s libsocketcan.so.2.2.1 libsocketcan.so.2 "command to generate a link file, as shown below.
Use 3 test software
The executable file "iTOP-4418-MiniLinux-CAN_V1.0" unpacked "can_test" directory "can_test" U copied to disk, as shown below.
Then use the command "mount / dev / udisk / mnt / disk /" u disk mount to the development plate, using the command "cp -r / mnt / disk / can_test / topeet /" copy to executable file "/ topeet "directory, using the command" umount / dev / udisk "dismount, as shown in FIG.
In the same manner as the executable files are copied to another development board, using the command "cd / topeet" enter "/ topeet" directory, we can use the command "ls" view "can_test", as shown in FIG.
In a development board, to use the command "./can_test -r can0 &", to run the program received, as shown in FIG.
Then a development board on the other, to use the command "./
can_test -s can0 ", to run the program transmission, as shown in FIG.
The first will be a development board receives the information sent, as FIG.
Transfer: http://www.topeetboard.com