Not sure of what errors you are getting. You can upload but get errors/hangs using CAN?
Perhaps you can use an ftdi → usb dongle and print to Serial1 instead of Serial. Serial1 I think will default to rx=PA10, tx=PA9. I’m not sure if this gets you anywhere though.