We‘ve published a CAN driver for MPC5775B/E and MPC5748G in github. As far as I know, your MPC5777C has the identical FlexCAN devices, and you could consider adopting that driver.
In GitHub, search for project DEVKIT-MPC5748G and go to sample CAN ( https://github.com/PeterVranken/DEVKIT-MPC5748G/tree/master/samples/CAN ). The code is well documented, made for the compiler from the Design Studio and should be soon migrated. C11 is the language standard required for the compilation. I would expect differences in pin routing, dependent on the board you use.