
Make sure to enable the below options before building the image:
$ make menuconfig
Target packages --->
Libraries --->
Networking --->
[*] canfestival
driver (socket) --->
(--SDO_MAX_LENGTH_TRANSFER=512 --SDO_BLOCK_SIZE=75
--SDO_MAX_SIMULTANEOUS_TRANSFERS=1) additional configure options
[*] install examples
[*] libsocketcan
Networking applications --->
[*] can-utils
[*] iproute2
NOTE
• The following options are displayed only when the
canfestival
option is set to Y.
• Linux uses the SocketCAN interface, so the
driver
option selects the socket.
• The following
additional configure options
can be configured in the
config.h
file of CANopen:
Parameter description:
— --SDO_MAX_LENGTH_TRANSFER: Sets buffer size of SDO protocol.
— -- SDO_BLOCK_SIZE: Sets the maximum number of frames that can be sent by SDO block transport
protocol.
— --SDO_MAX_SIMULTANEOUS_TRANSFERS: Sets the number of SDO modules.
• Install binary application to openil filesystem, if the
install examples
option is set to Y.
NOTE
13.3.4 Running the CANopen application
This section describes the procedure for running the CANopen-app application. Only the LS1021A platforms support this
application.
1. First, boot the LS1021A-IoT board.
2. Waiting for the baremetal core to output below information:
Note: the CANopen protocol starts to run!
=>
3. Then, run the
CANopen-app
command in any directory in Linux prompt. While executing this command, first run the test
code.
4. After the test code is completed, you can implement the required instructions. The command
CANopen-app
execution
process steps are described below:
a. First, indicate whether the CAN interface has opened successfully. All commands are dynamically registered. Then,
indicate whether the command was registered successfully.
• Command registration log
Command Registration Log:
[root@OpenIL:~]# CANopen-app
[ 80.899975] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
Note: open the CAN interface successfully!
NXP Semiconductors
FlexCAN
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
173 / 199