SIL/HIL with matlab/simulink models

I would like to have my simulink models replace the known jmavsim or gazebo simulators in a SIL or HIL simulation configuration.
Any ideas of how to establish such a mavlink interface?

Taking the example of SIL:
I ran the following: make px4_sitl none_iris, this ran an instance of PX4 on my machine waiting for a simulator to connect with a TCP connection on port 4560.
But I can’t get matlab (the simulator) to exchange mavlink data with PX4.

I’d start here: PX4-SITL_gazebo/mavlink_interface.cpp at 7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0 · PX4/PX4-SITL_gazebo · GitHub

Although the code is in a gazebo directory, it looks like you could use the shared lib, as-is, with your own sim model. Just use the interface to it, defined in mavlink_interface.hpp. Unfortunately, I’m unable to build gazebo_sitl and could not verify.