Anyway, cross compiling and testing via USB to CAN dongle can be done on both systems and in fact I'm doing that on the PC. Just so much faster. But once I start using the Pi HAT with MCP2515 for CAN or the internal CAN on the BBB I'm screwed. Pretty well have to debug on site.
Well, most of the time you don't have to debug on site if you change your architecture a bit. Here is one example: having a fleet of Balena enabled ARM boards connected to CAN 2.0B via CAN shield and using SocketCAN, with WiFi or 4G shields for communication. CAN messages go through custom J1939 filter and then they are forwarded to a custom TCP/IP server. That TCP/IP server can be on ARM board it self, or on your PC - having the same or different logic just for debugging. On such setup GDB remote debugging also works, and WireShark SocketCAN and J1939 disectors can also be used when needed. Either on board, or on development pc after tunneling and forwarding SocketCAN messages. Alternative for CAN<>ETH interfacing can be usage of socketcand daemon.