I’m trying to do data acquisition with ROS2 on a jetson orin nano, the first step of this is to connect the nano to the CAN BUS via a transceiver. I’m using an MCP2515 CAN module for this.
The problems I’m facing are:
-
The module doesn’t get powered up i.e. the PWR LED on it doesn’t glow even when I connect 5V and GND, I checked the pins with a multimeter , it shows around 4.9V.
-
I’m tying to follow along this github solution here but I get stuck here:
when I run this
make all_jetsonnano
This is my console o/p:
CC [M] /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function ‘mcp25xxfd_handle_tefif_one’:
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1313:17: error: too few arguments to function ‘can_rx_offload_get_echo_skb’
1313 | can_rx_offload_get_echo_skb(&priv->offload,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/spi_can_compatible.h:18,
from /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:15,
from /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:
./include/linux/can/rx-offload.h:47:14: note: declared here
47 | unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function ‘mcp25xxfd_hw_rx_obj_to_skb’:
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1482:28: error: implicit declaration of function ‘can_dlc2len’; did you mean ‘can_fd_dlc2len’? [-Werror=implicit-function-declaration]
1482 | cfd->len = can_dlc2len(get_canfd_dlc(dlc));
| ^~~~~~~~~~~
| can_fd_dlc2len
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1482:40: error: implicit declaration of function ‘get_canfd_dlc’ [-Werror=implicit-function-declaration]
1482 | cfd->len = can_dlc2len(get_canfd_dlc(dlc));
| ^~~~~~~~~~~~~
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1487:28: error: implicit declaration of function ‘get_can_dlc’ [-Werror=implicit-function-declaration]
1487 | cfd->len = get_can_dlc(FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC,
| ^~~~~~~~~~~
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function ‘mcp25xxfd_tx_obj_from_skb’:
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:2321:15: error: implicit declaration of function ‘can_len2dlc’; did you mean ‘can_fd_len2dlc’? [-Werror=implicit-function-declaration]
2321 | dlc = can_len2dlc(cfd->len);
| ^~~~~~~~~~~
| can_fd_len2dlc
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function ‘mcp25xxfd_start_xmit’:
/home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:2423:9: error: too few arguments to function ‘can_put_echo_skb’
2423 | can_put_echo_skb(skb, ndev, tx_head);
| ^~~~~~~~~~~~~~~~
In file included from ./include/linux/can/dev.h:23,
from /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:14,
from /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:
./include/linux/can/skb.h:20:5: note: declared here
20 | int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:295: /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o] Error 1
make[1]: *** [Makefile:1910: /home/agnirath/Downloads/seeed-linux-dtoverlays/modules/CAN-HAT] Error 2
make: *** [Makefile:157: all_jetsonnano] Error 2
If someone could please help me with this