As far as I’ve tested, the M4 cores on the iMX7 and the iMX8 seem very similar and so is the RPMsg implementation. Also, FreeRTOS itself takes care of a lot of the abstraction.
I believe your software should be easily portable - at most you’ll need to redefine things like pin assignments. The bulk of the code should remain the same.