Cortex M series and their compatibility

Hello ,

I am new to ARM. I have a particular software package written to the Cortex  M0+ MCU. How can I evaluate that these libraries will be compatible with other type of cortex M series microcontrollers. I need to perform a porting from the given MCU to another MCU (we cannot use the given cortex m0+) hence I am looking for another MCU to which the porting is much easier. Are the libraries compatible to each other. The MCU given is: STM32L0 series.

Thanks!