Connecting two Cortexes via serial connection in a master/slave configuration

Is there a way to connect two Cortexes together via a serial connection so that one can control the other and access its ports? I saw evidence of this when I was researching this, but found no way to actually achieve this.

Simply connect the ground, TX to RX, and RX to TX from one cortex’s UART port to another
you will have to create your own serial protocol to control motors and sensors like you want

Thank you!

This link is very helpful. Includes a nice protocol scheme.

https://vexforum.com/t/communicating-between-two-cortex-dual-cortex-robot/24236/1